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

Cannot run named process type when using --exit-code #3261

Open
schneems opened this issue Mar 21, 2025 · 0 comments
Open

Cannot run named process type when using --exit-code #3261

schneems opened this issue Mar 21, 2025 · 0 comments

Comments

@schneems
Copy link
Contributor

Expected: Running heroku run <cmd> functions the same as heroku run <cmd> --exit-code but the exit code $? is preserved.

Actual:

$ cat Gemfile
source 'https://rubygems.org'
gem 'rake'
$ cat Gemfile.lock
GEM
  remote: https://rubygems.org/
  specs:
    rake (13.2.1)

PLATFORMS
  arm64-darwin-24
  ruby

DEPENDENCIES
  rake

BUNDLED WITH
   2.6.6
$ cat Procfile
yolo: echo "yolo"
$ heroku run yolo
Running yolo on ⬢ sheltered-savannah-90249... up, run.9872
yolo
$ heroku run yolo --exit-code
Running yolo on ⬢ sheltered-savannah-90249... up, run.7971
/bin/bash: line 1: yolo: command not found

 ›   Error: Process exited with code 127
 ›   Code: 127

This seems to only happen when using commands that are defined by a buildpack or the Procfile. In this case yolo is defined in the Procfile.

This issue affects users of integration testing library heroku_hatchet which sets this flag by default https://github.com/heroku/hatchet/blob/1cbbf7f0b482d466bfd32a4cacbc3177010dab97/lib/hatchet/heroku_run.rb#L122C48-L122C57

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

1 participant