mirror of
https://github.com/restic/restic.git
synced 2026-02-03 04:20:45 -05:00
Merge pull request #5297 from MichaelEischer/fix-overwrite-behavior-help
restore: fix help message on invalid OverwriteBehavior
This commit is contained in:
commit
784097a4f8
2 changed files with 2 additions and 2 deletions
|
|
@ -84,7 +84,7 @@ func (opts *RestoreOptions) AddFlags(f *pflag.FlagSet) {
|
|||
f.BoolVar(&opts.DryRun, "dry-run", false, "do not write any data, just show what would be done")
|
||||
f.BoolVar(&opts.Sparse, "sparse", false, "restore files as sparse")
|
||||
f.BoolVar(&opts.Verify, "verify", false, "verify restored files content")
|
||||
f.Var(&opts.Overwrite, "overwrite", "overwrite behavior, one of (always|if-changed|if-newer|never) (default: always)")
|
||||
f.Var(&opts.Overwrite, "overwrite", "overwrite behavior, one of (always|if-changed|if-newer|never)")
|
||||
f.BoolVar(&opts.Delete, "delete", false, "delete files from target directory if they do not exist in snapshot. Use '--dry-run -vv' to check what would be deleted")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ func (c *OverwriteBehavior) Set(s string) error {
|
|||
*c = OverwriteNever
|
||||
default:
|
||||
*c = OverwriteInvalid
|
||||
return fmt.Errorf("invalid overwrite behavior %q, must be one of (always|if-newer|never)", s)
|
||||
return fmt.Errorf("invalid overwrite behavior %q, must be one of (always|if-changed|if-newer|never)", s)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue