Skip to content

Commit 85beef8

Browse files
ItxakaCopilot
andauthored
feat: add debug flag and enforce argument requirements (#396)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e7d042a commit 85beef8

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

internal/cmd/build-uki.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,9 @@ func createInitramfs(sourceDir, artifactsTempDir string) error {
688688
"proc": true,
689689
}
690690

691+
// TODO: Exclude systemd-bootx64.efi, linuxx64.efi.stub, addonx64.efi.stub and arm64 counterparts from the initramfs
692+
// we dont want to ship those in the final image!
693+
691694
if err = os.Chdir(sourceDir); err != nil {
692695
return fmt.Errorf("changing to %s directory: %w", sourceDir, err)
693696
}

internal/cmd/sysext.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,20 @@ var SysextCmd = cli.Command{
4949
Value: "amd64",
5050
Usage: "Arch to get the image from and build the sysext for. Accepts amd64 and arm64 values.",
5151
},
52+
&cli.BoolFlag{
53+
Name: "debug",
54+
Value: false,
55+
Usage: "Enable debug logging",
56+
},
5257
},
5358
Before: func(ctx *cli.Context) error {
5459
arch := ctx.String("arch")
5560
if arch != "amd64" && arch != "arm64" {
5661
return fmt.Errorf("unsupported architecture: %s", arch)
5762
}
63+
if ctx.NArg() < 2 {
64+
return fmt.Errorf("missing required arguments: <name> <container>")
65+
}
5866
return nil
5967
},
6068
Action: func(ctx *cli.Context) error {

0 commit comments

Comments
 (0)