open-cli-tools / open-cli-tools/concurrently

Impossible to kill a triggered shell script in Windows

Open
#137 5 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
TypeScript
Stars
7.9k
Forks
281
Avg merge
17h 12m
Merged PRs (30d)
1

Description

Example:

We're having the following inside of our scripts in package.json (I've removed all unnecessary clutter):

"scripts": {
  "test": "concurrently  \"sh ./scripts/development/client.sh\"  --names \"CLIENT\" -c \"blue.bold\" --prefix name --kill-others"
},

The client.sh file looks like this:

#!/bin/sh
source './.env'
./node_modules/.bin/next src/client -p $CLIENT_PORT

Running npm run test works just fine, but stopping the script doesn't stop the triggered shell script nor the javascript script inside of it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the package.json script and scripts/development/client.sh, then reproduce the process tree by running npm run test on Windows. Trace how the concurrently command handles the shell and nested Next.js process; done means stopping the command also terminates both triggered processes.

Written by the indexing model from the issue text.

Assessment

Tech stack
next.js, node.js, shell, typescript
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.