cli icon indicating copy to clipboard operation
cli copied to clipboard

When `heroku pipelines:promote` fails, it returns exit code 0

Open peternixey opened this issue 5 years ago • 0 comments

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

After running heroku pipelines:promote -a $heroku_app_name, an error on Heroku caused the promotion step to fail with the following output:

heroku pipelines:promote -a myapp

Fetching app info...
Fetching apps from myapp...
Starting promotion to production...
Waiting for promotion to complete...
Fetching release info...
Running release command...
 ›   Warning: 
 ›   Promotion to some apps failed
myapp: failed
                  release command failed
CircleCI received exit code 0

The problem is that the exit code of 0 meant that the rest of the CI process kept rolling. It didn't realise that this step had failed.

What is the expected behavior?

I would expect the failed promotion to exit with code=1 so that it's clear that the step failed.

CLI Version: heroku/7.42.6 linux-x64 node-v12.16.2

peternixey avatar Aug 13 '20 14:08 peternixey