Restore fails fast on first error; --skip-errors is now global
restore aborts on the first per-file failure by default, surfacing the file path and the underlying error and suggesting --skip-errors to continue past failures. --skip-errors moved from a 'snapshot create' subcommand flag to a top-level persistent flag on the root command. It applies to both snapshot create and restore. Old 'vaultik snapshot create --skip- errors' still works because persistent flags are inherited.
This commit is contained in:
@@ -127,6 +127,7 @@ func buildRestoreInvokes(snapshotID string, opts *RestoreOptions) []fx.Option {
|
||||
TargetDir: opts.TargetDir,
|
||||
Paths: opts.Paths,
|
||||
Verify: opts.Verify,
|
||||
SkipErrors: GetRootFlags().SkipErrors,
|
||||
}
|
||||
if err := app.Vaultik.Restore(restoreOpts); err != nil {
|
||||
if err != context.Canceled {
|
||||
|
||||
Reference in New Issue
Block a user