mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-17 23:59:11 +02:00
Fix quote strip behavior for ARG values
* fixes issue 847 * previous implementation did not properly parse blank values which were enclosed in quotes
This commit is contained in:
@@ -118,7 +118,7 @@ func Test_stripEnclosingQuotes(t *testing.T) {
|
||||
success: true,
|
||||
}, {
|
||||
name: "blank value with enclosing double quotes",
|
||||
inArgs: []instructions.ArgCommand{newArgCommand("MEOW", "\"\"")},
|
||||
inArgs: []instructions.ArgCommand{newArgCommand("MEOW", `""`)},
|
||||
expected: []string{""},
|
||||
success: true,
|
||||
}, {
|
||||
@@ -144,6 +144,14 @@ func Test_stripEnclosingQuotes(t *testing.T) {
|
||||
},
|
||||
expected: []string{"Purr", "Mrow"},
|
||||
success: true,
|
||||
}, {
|
||||
name: "multiple values, one blank, one a single int",
|
||||
inArgs: []instructions.ArgCommand{
|
||||
newArgCommand("MEOW", `""`),
|
||||
newArgCommand("MEW", `1`),
|
||||
},
|
||||
expected: []string{"", "1"},
|
||||
success: true,
|
||||
}, {
|
||||
name: "no values",
|
||||
success: true,
|
||||
|
||||
Reference in New Issue
Block a user