Skip to content

Commit 4336440

Browse files
committed
feat: add exit code support for partial batch failures in stop
1 parent 6d2c612 commit 4336440

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

pkg/cmd/stop/stop.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ func NewCmdStop(t *terminal.Terminal, loginStopStore StopStore, noLoginStopStore
6868
}
6969
}
7070
if allErr != nil {
71-
return breverrors.WrapAndTrace(allErr)
71+
exitCode := 1 // all failed
72+
if len(stoppedNames) > 0 {
73+
exitCode = 2 // partial failure
74+
}
75+
return breverrors.NewExitCodeError(allErr, exitCode)
7276
}
7377
}
7478
return nil

0 commit comments

Comments
 (0)