You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-11-06 09:09:19 +02:00
fix: wrong command line format for multiple extension files (#3434)
This commit is contained in:
@@ -797,9 +797,12 @@ func handleMtaExtensionDescriptors(mtaExtensionDescriptor string) ([]string, []s
|
||||
continue
|
||||
}
|
||||
// REVISIT: maybe check if the extension descriptor exists
|
||||
result = append(result, "-e", part)
|
||||
extFiles = append(extFiles, part)
|
||||
}
|
||||
if len(extFiles) > 0 {
|
||||
result = append(result, "-e")
|
||||
result = append(result, strings.Join(extFiles, ","))
|
||||
}
|
||||
return result, extFiles
|
||||
}
|
||||
|
||||
|
||||
@@ -1237,9 +1237,7 @@ func TestExtensionDescriptorsWithMinusE(t *testing.T) {
|
||||
extDesc, _ := handleMtaExtensionDescriptors("-e 1.yaml -e 2.yaml")
|
||||
assert.Equal(t, []string{
|
||||
"-e",
|
||||
"1.yaml",
|
||||
"-e",
|
||||
"2.yaml",
|
||||
"1.yaml,2.yaml",
|
||||
}, extDesc)
|
||||
})
|
||||
|
||||
@@ -1247,9 +1245,7 @@ func TestExtensionDescriptorsWithMinusE(t *testing.T) {
|
||||
extDesc, _ := handleMtaExtensionDescriptors("1.yaml -e 2.yaml")
|
||||
assert.Equal(t, []string{
|
||||
"-e",
|
||||
"1.yaml",
|
||||
"-e",
|
||||
"2.yaml",
|
||||
"1.yaml,2.yaml",
|
||||
}, extDesc)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user