Skip to content

Commit aa5131f

Browse files
committed
Don't include empty strings in list of workloadNames
1 parent a8718ab commit aa5131f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/deployclient/deployclient.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ func Prepare(ctx context.Context, cfg *Config) (*pb.DeploymentRequest, error) {
135135

136136
workloadNames := make([]string, 0, len(resources))
137137
for i := range resources {
138-
workloadNames = append(workloadNames, detectWorkloadName(resources[i]))
138+
workloadName := detectWorkloadName(resources[i])
139+
if len(workloadName) > 0 {
140+
workloadNames = append(workloadNames, workloadName)
141+
}
139142
}
140143

141144
if len(workloadNames) == 1 {

0 commit comments

Comments
 (0)