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

Keystroke options dont work when watcher executed from composer script #54

Closed
mfour-merickson opened this issue Dec 22, 2017 · 2 comments

Comments

@mfour-merickson
Copy link

As developer, if I launch the Watcher command from a composer.json script, the keyboard watcher does not work

...
  "scripts": {
    "test": "vendor/bin/phpunit --colors=always",
    "watch-tickets": "vendor/bin/phpunit-watcher watch --testsuite Tickets"
  }
...
Press a to run all tests.
Press t to filter by test name.
Press p to filter by file name.
Press q to quit the watcher.
Press Enter to trigger a test run.

The actual keystroke is sent to the console, but the actions are not triggered

image

@mfour-merickson
Copy link
Author

I have figured this one out (here is the trick in the event someone else has the problem)

...
  "scripts": {
    "test": "vendor/bin/phpunit --colors=always",
    "watch-tickets": "vendor/bin/phpunit-watcher watch --testsuite Tickets  < /dev/tty"
  }
...

@fotonmoton
Copy link

I think @mfour-merickson`s trick should be in docs

iandunn added a commit to iandunn/phpunit-watcher that referenced this issue Jun 12, 2020
I ran into the same problem as spatie#54, and adding `< /dev/tty` worked for me.

I had to search through closed issues to find it, though. I think it's worth adding to the readme.
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

2 participants