Skip to content

Commit

Permalink
fixup! feat(cli): build based on configuration
Browse files Browse the repository at this point in the history
definition of rootfstype
  • Loading branch information
tuler committed Oct 11, 2024
1 parent 8ec7c5b commit febc8e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/cli/src/machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ export const bootMachine = async (
(variable) => `--append-entrypoint=export "${variable}"`,
);

// check if we need a rootfstype boot arg
const root = config.drives.root;
if (root?.format === "sqfs") {
const definedRootfsType = config.machine.bootargs.find((arg) =>
arg.startsWith("rootfstype="),
);
// not checking here if user intentionally defined wrong type
if (!definedRootfsType) {
config.machine.bootargs.push("rootfstype=squashfs");
}
}

// bootargs from config string array
const bootargs = machine.bootargs.map(
(arg) => `--append-bootargs="${arg}"`,
Expand Down

0 comments on commit febc8e0

Please sign in to comment.