diff --git a/plugins/config/subcommands.go b/plugins/config/subcommands.go index dc35bcf3b..919aaed38 100644 --- a/plugins/config/subcommands.go +++ b/plugins/config/subcommands.go @@ -150,7 +150,7 @@ func getEnvironment(appName string, merged bool) (env *Env) { //getCommonArgs extracts common positional args (appName and keys) func getCommonArgs(global bool, args []string) (appName string, keys []string) { - nextArg := 0 + keys = args if !global { if len(args) > 0 { appName = args[0] @@ -158,9 +158,8 @@ func getCommonArgs(global bool, args []string) (appName string, keys []string) { if appName == "" { common.LogFail("Please specify an app or --global") } else { - nextArg++ + keys = args[1:] } } - keys = args[nextArg:] return appName, keys }