Skip to content

Commit

Permalink
fixup! feat(cli): build based on configuration
Browse files Browse the repository at this point in the history
using new cartesi-machine options
  • Loading branch information
tuler committed Oct 18, 2024
1 parent ca0db7b commit 0b4cbf6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions apps/cli/src/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export const bootMachine = async (

// list of environment variables of docker image
const env = info?.env ?? [];
const envs = env.map(
(variable) => `--append-entrypoint=export "${variable}"`,
);
const envs = env.map((variable) => `--env=${variable}`);

// check if we need a rootfstype boot arg
const root = config.drives.root;
Expand Down Expand Up @@ -89,7 +87,7 @@ export const bootMachine = async (
args.push("--final-hash");
}
if (info?.workdir) {
args.push(`--append-init=WORKDIR="${info.workdir}"`);
args.push(`--workdir="${info.workdir}"`);
}
if (interactive) {
args.push("-it");
Expand All @@ -104,7 +102,7 @@ export const bootMachine = async (
args.push(`--store=${store}`);
}
if (user) {
args.push(`--append-init=USER=${user}`);
args.push(`--user=${user}`);
}

return execaDockerFallback(command, args, {
Expand Down

0 comments on commit 0b4cbf6

Please sign in to comment.