From c219cbee8a24e8752bd08ce7ef3b3dd5dbc04eaa Mon Sep 17 00:00:00 2001 From: Alex Guidi Date: Thu, 9 Oct 2025 20:49:05 +0200 Subject: [PATCH] changes the flag remove-signatures default to false Having the flag --remove-signatures as false results to always mirroring the signature as default. Signed-off-by: Alex Guidi --- v2/internal/pkg/cli/executor.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/v2/internal/pkg/cli/executor.go b/v2/internal/pkg/cli/executor.go index e786b67e0..4a51a21e4 100644 --- a/v2/internal/pkg/cli/executor.go +++ b/v2/internal/pkg/cli/executor.go @@ -296,7 +296,7 @@ func NewMirrorCmd(log clog.PluggableLoggerInterface) *cobra.Command { cmd.Flags().IntVar(&opts.Global.MaxNestedPaths, "max-nested-paths", 0, "Number of nested paths, for destination registries that limit nested paths") cmd.Flags().BoolVar(&opts.Global.StrictArchiving, "strict-archive", false, "If set, generates archives that are strictly less than archiveSize (set in the imageSetConfig). Mirroring will exit in error if a file being archived exceed archiveSize(GB)") cmd.Flags().StringVar(&opts.RootlessStoragePath, "rootless-storage-path", "", "Override the default container rootless storage path (usually in etc/containers/storage.conf)") - cmd.Flags().BoolVar(&opts.RemoveSignatures, "remove-signatures", true, "Do not copy image signature") + cmd.Flags().BoolVar(&opts.RemoveSignatures, "remove-signatures", false, "Do not copy image signature") cmd.Flags().BoolVar(&opts.Global.IgnoreReleaseSignature, "ignore-release-signature", false, "Ignore release signature") HideFlags(cmd) @@ -1060,8 +1060,6 @@ func (o *ExecutorSchema) setupLogsLevelAndDir() error { o.Log.Level(o.Opts.Global.LogLevel) // set up location of logs dir o.LogsDir = filepath.Join(o.Opts.Global.WorkingDir, logsDir) - // clean up logs directory - os.RemoveAll(o.LogsDir) // create logs directory err := o.MakeDir.makeDirAll(o.LogsDir, 0755)