Skip to content

Commit 78d72d9

Browse files
committed
Return error when service update triggers rollback
When a service update fails and triggers a rollback, the command now exits with code 1 instead of 0 Fixes #6752 Signed-off-by: Mohamed Talal Seif <[email protected]>
1 parent d5ed037 commit 78d72d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/command/service/progress/progress.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ func ServiceProgress(ctx context.Context, apiClient client.APIClient, serviceID
138138
if message != nil {
139139
_ = progressOut.WriteProgress(*message)
140140
}
141+
if rollback {
142+
// Exit with error when update was rolled back
143+
return fmt.Errorf("service update rolled back: %s", res.Service.UpdateStatus.Message)
144+
}
141145
return nil
142146
}
143147

0 commit comments

Comments
 (0)