cmd: fix environment variables not setting command line flags

Before this fix quite a lot of the commands were ignoring environment
variables intended to set flags.
This commit is contained in:
Nick Craig-Wood 2019-10-11 16:55:04 +01:00
parent 19429083ad
commit 1b2ffbeca0
24 changed files with 140 additions and 105 deletions

View file

@ -18,8 +18,8 @@ var (
func init() {
cmd.Root.AddCommand(commandDefinition)
flagSet := commandDefinition.Flags()
flags.BoolVarP(flagSet, &Reverse, "reverse", "", Reverse, "Reverse cryptdecode, encrypts filenames")
cmdFlags := commandDefinition.Flags()
flags.BoolVarP(cmdFlags, &Reverse, "reverse", "", Reverse, "Reverse cryptdecode, encrypts filenames")
}
var commandDefinition = &cobra.Command{