You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heroku CLI provides a method to run one-off containers in detached/non-interactive mode (heroku run:detached). I use this command to wget a remote bash script and execute it. In the script, I have these lines:
#!/usr/bin/env bashset -x
echo"Starting..."
slimerjs --headless /tmp/script.js
echo"Finishing..."# now calling webhook to notify other end
curl -v -d 'done=xyz' https://webhook.example.com
However the process exits with 0 and the lines after slimerjs never work.
It's weird that when running in interactive mode (full TTY), the script works as expected.
Actual results:
2019-05-11T17:23:32.125165+00:00 app[run.7880]: + echo Starting...
2019-05-11T17:23:32.125212+00:00 app[run.7880]: Starting...
2019-05-11T17:23:32.125295+00:00 app[run.7880]: + slimerjs --headless /tmp/script.js
2019-05-11T17:23:34.472415+00:00 app[run.7880]: Waiting for the button to fully appear...
2019-05-11T17:23:35.472665+00:00 app[run.7880]: Starting to render the page...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Completed. Exiting now...
2019-05-11T17:24:00.678075+00:00 heroku[run.7880]: State changed from up to complete
2019-05-11T17:24:00.660840+00:00 heroku[run.7880]: Process exited with status 0
Expected results:
2019-05-11T17:23:32.125165+00:00 app[run.7880]: + echo Starting...
2019-05-11T17:23:32.125212+00:00 app[run.7880]: Starting...
2019-05-11T17:23:32.125295+00:00 app[run.7880]: + slimerjs --headless /tmp/script.js
2019-05-11T17:23:34.472415+00:00 app[run.7880]: Waiting for the button to fully appear...
2019-05-11T17:23:35.472665+00:00 app[run.7880]: Starting to render the page...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Completed. Exiting now...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: + echo Finishing...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Finishing...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: . . .
2019-05-11T17:23:37.666730+00:00 app[run.7880]: ( curl verbose... )
2019-05-11T17:23:37.666730+00:00 app[run.7880]: . . .
2019-05-11T17:24:00.678075+00:00 heroku[run.7880]: State changed from up to complete
2019-05-11T17:24:00.660840+00:00 heroku[run.7880]: Process exited with status 0
The text was updated successfully, but these errors were encountered:
versions
Steps to reproduce the issue
Heroku CLI provides a method to run one-off containers in detached/non-interactive mode (
heroku run:detached
). I use this command towget
a remote bash script and execute it. In the script, I have these lines:However the process exits with
0
and the lines afterslimerjs
never work.It's weird that when running in interactive mode (full TTY), the script works as expected.
Actual results:
Expected results:
The text was updated successfully, but these errors were encountered: