From 88f661b6e772e0c00857dac270afcb8a0e007514 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Fri, 29 May 2020 14:50:17 -0400 Subject: [PATCH] fix: properly fetch keys for config command --- plugins/config/src/subcommands/subcommands.go | 2 +- plugins/config/subcommands.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/config/src/subcommands/subcommands.go b/plugins/config/src/subcommands/subcommands.go index 94460a188..2d7cdb04a 100644 --- a/plugins/config/src/subcommands/subcommands.go +++ b/plugins/config/src/subcommands/subcommands.go @@ -12,7 +12,7 @@ import ( func getKeys(args []string, global bool) []string { keys := args - if !global && len(keys) > 1 { + if !global && len(keys) > 0 { keys = keys[1:] } return keys diff --git a/plugins/config/subcommands.go b/plugins/config/subcommands.go index b610eade4..947585f7d 100644 --- a/plugins/config/subcommands.go +++ b/plugins/config/subcommands.go @@ -120,6 +120,7 @@ func CommandSet(appName string, pairs []string, global bool, noRestart bool, enc if len(pairs) == 0 { return errors.New("At least one env pair must be given") } + updated := make(map[string]string) for _, e := range pairs { parts := strings.SplitN(e, "=", 2)