Skip to content

Commit 8d159df

Browse files
committed
fix: Handle if the deploy has no labels
1 parent 94b2e09 commit 8d159df

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/setup-delivery.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ var setupDeliveryCmd = &cobra.Command{
5656
log.Fatal(err)
5757
}
5858

59+
if deployment.Labels == nil {
60+
deployment.Labels = map[string]string{}
61+
}
62+
5963
if _, exists := deployment.Labels[config.AppIdLabel]; exists {
6064
color.HiRed("This deployment already has a delivery label. If you wish to update it, please remove the label first.")
6165
os.Exit(1)

0 commit comments

Comments
 (0)