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

app.run fixes #58

Merged
merged 3 commits into from
Mar 8, 2019
Merged

app.run fixes #58

merged 3 commits into from
Mar 8, 2019

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented Mar 7, 2019

  • Allows options without values (say --no-notify) by passing nil as the value
  • Correctly order and separate our options from the actual command using --
  • Always report back the invoked programs's exit status, so it can be checked using $?.exitstatus

I wonder if we should not .to_s.shellescape the command part now. It leads to the whole thing being one quoted string, which the CLI then unpacks again: https://github.com/heroku/cli/blob/master/packages/run-v5/lib/helpers.js#L6-L10

All that potentially leads to is quoting madness in special cases; changing it as well should not impact any existing calls

lib/hatchet/app.rb Outdated Show resolved Hide resolved
@dzuelke dzuelke force-pushed the app-run-fixes branch 4 times, most recently from cb05ff4 to 4a94675 Compare March 8, 2019 16:00
and separate using double dash

avoids any possible conflicts between `heroku run` options and program options, e.g. when running `ls -a foo`

this also means it's no longer necessary to shell-escape the command (which would previously turn it into a single string, which the Heroku CLI then unpacked again)
can be tested afterwards using $?.exitstatus
@schneems schneems merged commit ac10db2 into master Mar 8, 2019
@edmorley edmorley deleted the app-run-fixes branch August 27, 2020 08:43
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

Successfully merging this pull request may close these issues.

2 participants