start-server-and-test
start-server-and-test copied to clipboard
Terminal output hijacked after test finishes
Thank you for this nice package!
Is this a bug report or a feature request?
Bug Report
- Version: ^1.5.0
- Platform: macOS High Sierra 10.13.6
- Expected Behavior: Tool runs (as part of npm script) and releases control back to my keyboard after it finishes.
- Actual Behavior: Script runs, and completes successfully, however the keyboard input stops coming through when I type into the terminal after the script finishes. The only way to fix it is to
reset
the terminal. Eventput reset
doesn't clean it up!
You can find this in action in our core repository: https://github.com/patternfly/patternfly-next
- Clone it
- Install it with
npm install
- Run npm script that uses this package with
npm run test:ci
- Type into terminal you just ran the test in, notice the characters you type are no longer output in the console, however the input is still being captured
- type
reset
, notice problem is fixed
Apologies if I've overlooked something and this isn't a bug with this lib. Thanks for looking into this!
yeah, I have noticed it too, not sure how fix this
Running stty -a
before/after shows that input echo has been turned off by the time start server and test script completes. If you stty echo
, to re-enable, after the script completes, echoing of terminal input is fixed.
Read more about this here: https://www.computerhope.com/unix/ustty.htm
Not sure if this is an acceptable solution, would it even work on Windows machine?
Btw this doesn't appear to be an issue on linux.. Hope this helps.