question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] How --handle-input can be used from CLI?

See original GitHub issue

I struggle with setting this up, I have such script:

"dev": "concurrently --handle-input \"npm run test -- --watch\" \"npm run build -- -w\" --kill-others-on-fail"

and I want to forward every input to the test script - so I thought it would be as easy to type something and that it would work.

After looking into the source code I see that InputHandler actually listens to data event on the inputStream, but it’s never triggered.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
Andaristcommented, Aug 17, 2019

I actually went different route slightly (havent used concurrently for this). It wasnt working for me because my test script (jest) was running with raw mode stdin and concurrently didnt support that.

1reaction
paescujcommented, Aug 23, 2022

Actually with --raw option it works as expected 😍👍

My final script:

"test:unit": "concurrently --raw --kill-others --handle-input --names test,build \"vitest --environment jsdom\" \"vite build --watch\"",

Thank you @paescuj 🙏

You’re welcome! Glad I could help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI basics. How to handle input requirements? - Elixir Forum
I'm trying build a basic cli app for the purpose of learning. Lets say we are making a basic cli for counting words...
Read more >
handle input for cli using child_process nodejs - Stack Overflow
1 Answer 1 ... If your goal is to produce a wallet with nodejs, there are other packages, after compiling the "blockchain-node" project,...
Read more >
Standard Input and Standard Output | Linux Shell - InformIT
Standard Input and Standard Output. Standard output is a place to which a program can send information (e.g., text).
Read more >
Getting User Input in Node.js - Codecademy
The prompt() function returns the user feedback, so simply store that return value to a variable to use it later. In the example...
Read more >
Add interactivity to your CLIs with React - LogRocket Blog
Now, we need to display the list of results and allow the user of our CLI to select the file they want. We...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found