aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/parser.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/parser.go b/cli/parser.go
index 50bd0bd..5fbbe3f 100644
--- a/cli/parser.go
+++ b/cli/parser.go
@@ -330,7 +330,7 @@ func flagKeyValueMatch(key string, values []string, index int) ([]string, string
if values[index] == key {
value := values[index + 1]
- remaining := append(values[:index], values[index + 2:]...)
+ remaining := append(copySlice(values[:index]), values[index + 2:]...)
return remaining, value, true
}
@@ -343,7 +343,7 @@ func flagKeyMatch(key string, values []string, index int) ([]string, bool) {
}
if values[index] == key {
- remaining := append(values[:index], values[index + 1:]...)
+ remaining := append(copySlice(values[:index]), values[index + 1:]...)
return remaining, true
}