heroku run exits with 0 even if the command fails, it should exit with 1 instead (or the error code returned from the respective command):
$ heroku update
heroku: Updating CLI... already on latest version: 7.29.0
Updating completions... done
$ DEBUG=true heroku run fail -a [app]
Running fail on ⬢ [app]... up, run.7787 (Standard-1X)
bash: fail: command not found
$ echo $?
0
(run on macOS, not behind any proxy)
From run's help:
$ heroku run --help
...
-x, --exit-code passthrough the exit code of the remote command
...
@RasPhilCo thanks! i had no idea this option exists. i still think this should be the default behavior, but it sounds like this is intentional, so i'll close this.
Most helpful comment
@RasPhilCo thanks! i had no idea this option exists. i still think this should be the default behavior, but it sounds like this is intentional, so i'll close this.