1
0
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:
Marcus Holl
2022-01-14 16:13:24 +01:00
committed by GitHub
parent 04c4460c78
commit 4acee9fc85
2 changed files with 6 additions and 7 deletions

View File

@@ -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
}

View File

@@ -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)
})