diff --git a/cmd/cmd_image.go b/cmd/cmd_image.go index 9487b2a1..e99fa8cc 100644 --- a/cmd/cmd_image.go +++ b/cmd/cmd_image.go @@ -77,6 +77,7 @@ func imageCreateCommandHandler(cmd *cobra.Command, args []string) { } mergeContainer := NewMergeConfigContainer(configFlags, globalFlags, nightlyFlags, nanosVersionFlags, buildImageFlags, providerFlags, pkgFlags) + err := mergeContainer.Merge(c) if err != nil { exitWithError(err.Error()) diff --git a/cmd/cmd_pkg.go b/cmd/cmd_pkg.go index 81404ed6..74536d51 100644 --- a/cmd/cmd_pkg.go +++ b/cmd/cmd_pkg.go @@ -446,7 +446,6 @@ func loadCommandHandler(cmd *cobra.Command, args []string) { runLocalInstanceFlags := NewRunLocalInstanceCommandFlags(flags) pkgFlags := NewPkgCommandFlags(flags) pkgFlags.Package = args[0] - pkgFlags.SluggedPackage = strings.ReplaceAll(args[0], ":", "_") c := api.NewConfig() diff --git a/cmd/flags_pkg.go b/cmd/flags_pkg.go index 418350c8..440eae88 100644 --- a/cmd/flags_pkg.go +++ b/cmd/flags_pkg.go @@ -6,11 +6,12 @@ import ( "os" "path" "path/filepath" - - "github.com/nanovms/ops/types" + "strings" "github.com/nanovms/ops/lepton" api "github.com/nanovms/ops/lepton" + "github.com/nanovms/ops/types" + "github.com/spf13/pflag" ) @@ -36,6 +37,8 @@ func (flags *PkgCommandFlags) MergeToConfig(c *types.Config) (err error) { return } + flags.SluggedPackage = strings.ReplaceAll(flags.Package, ":", "_") + packagePath := flags.PackagePath() if _, err := os.Stat(packagePath); os.IsNotExist(err) {