mirror of
https://github.com/rclone/rclone.git
synced 2026-01-06 18:43:50 +00:00
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:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/rclone/rclone/cmd"
|
||||
"github.com/rclone/rclone/fs/config"
|
||||
"github.com/rclone/rclone/fs/config/flags"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
@@ -16,7 +17,8 @@ var (
|
||||
|
||||
func init() {
|
||||
cmd.Root.AddCommand(commandDefinition)
|
||||
commandDefinition.Flags().BoolVarP(&listLong, "long", "", listLong, "Show the type as well as names.")
|
||||
cmdFlags := commandDefinition.Flags()
|
||||
flags.BoolVarP(cmdFlags, &listLong, "long", "", listLong, "Show the type as well as names.")
|
||||
}
|
||||
|
||||
var commandDefinition = &cobra.Command{
|
||||
|
||||
Reference in New Issue
Block a user