diff --git a/cmd/cloudFoundryDeploy.go b/cmd/cloudFoundryDeploy.go index 970ed5fe7..7dc638ad4 100644 --- a/cmd/cloudFoundryDeploy.go +++ b/cmd/cloudFoundryDeploy.go @@ -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 } diff --git a/cmd/cloudFoundryDeploy_test.go b/cmd/cloudFoundryDeploy_test.go index 536e0e3d7..3a74b0e68 100644 --- a/cmd/cloudFoundryDeploy_test.go +++ b/cmd/cloudFoundryDeploy_test.go @@ -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) })