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

Ctrl + C after attaching to dyno using heroku-run Dyno class #1299

Open
vedantgoyal opened this issue Aug 21, 2019 · 0 comments
Open

Ctrl + C after attaching to dyno using heroku-run Dyno class #1299

vedantgoyal opened this issue Aug 21, 2019 · 0 comments

Comments

@vedantgoyal
Copy link

vedantgoyal commented Aug 21, 2019

This project is for the Heroku CLI only. Use https://help.heroku.com for anything that is not specific to the CLI itself.

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

I am using 'heroku-run' package to create a dyno and attach to it to run commands. After the command is run on the dyno, I display text on console in a loop. I am however not able to stop the display using sigint. It seems that console ignores any keyboard input to stop the process. This only happens when the options sent to the Dyno library has attach option set as true.

What is the expected behavior?

The console should exit the process when typing Ctrl + C

example:

let { Dyno } = require('heroku-run')
let opts = {
   app: myApp,
   command: migrationCmd,
   release: currentRelease,
   size: 'Private-M',
   attach: true,  // this bug does not happen on attach = false
   'exit-code': true,
   heroku: myClient
}
let dyno = new Dyno(opts)
await dyno.start()
while (!formationReady()) {
  displayDynoFormation() . //cannot exit this loop with ctrl +c 
  cli.wait(1)
}
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