forked from TrueCloudLab/rclone
cmd: fix boolean backend flags - fixes #2402
Before this change, boolean flags such as `--b2-hard-delete` were
failing to be recognised unless they had a parameter.
This bug was introduced as part of the config re-organisation:
f3f48d7d49
This commit is contained in:
parent
dcc74fa404
commit
b1f31c2acf
1 changed files with 1 additions and 1 deletions
|
@ -523,7 +523,7 @@ func AddBackendFlags() {
|
|||
}
|
||||
help = strings.TrimSpace(help)
|
||||
flag := pflag.CommandLine.VarPF(opt, name, string(opt.ShortOpt), help)
|
||||
if _, isBool := opt.Value.(bool); isBool {
|
||||
if _, isBool := opt.Default.(bool); isBool {
|
||||
flag.NoOptDefVal = "true"
|
||||
}
|
||||
// Hide on the command line if requested
|
||||
|
|
Loading…
Add table
Reference in a new issue