Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heroku run exits with 0 even if the command fails #1319

Closed
svenfuchs opened this issue Sep 10, 2019 · 2 comments
Closed

heroku run exits with 0 even if the command fails #1319

svenfuchs opened this issue Sep 10, 2019 · 2 comments

Comments

@svenfuchs
Copy link

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)

@svenfuchs svenfuchs changed the title heroku run exits with 0 even if the command fails: heroku run exits with 0 even if the command fails Sep 10, 2019
@RasPhilCo
Copy link
Contributor

RasPhilCo commented Sep 24, 2019

From run's help:

$ heroku run --help
...
  -x, --exit-code      passthrough the exit code of the remote command
...

@svenfuchs
Copy link
Author

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants