Repository navigation
Conversation
| { | ||
| "compilerOptions": { | ||
| "lib": ["es2023"], | ||
| "types": ["node"], |
There was a problem hiding this comment.
I'm not sure why this wasn't added previously, but in my local environment, TypeScript was throwing errors for Node.js global APIs (e.g., process). So I added "node" to compilerOptions.types here to resolve it.
There was a problem hiding this comment.
Your IDE might've used a newer TS version than the one installed in the project.
This will be necessary when that upgrade is finally done, but I'd like to revert this one
gustavohenke
left a comment
There was a problem hiding this comment.
In case you missed it, concurrently now works with non-default shells: #589
This means that switching behaviour on the platform is not right when each shell has its own rules. You could have bash.exe on Windows, for instance.
| return args | ||
| .map((arg) => { | ||
| // Only process arguments containing double quotes or spaces. | ||
| if (!contains(arg, '" ')) { |
There was a problem hiding this comment.
You can write this as /["\s]/.test(arg)
| }); | ||
|
|
||
| // Wrap arguments containing spaces in double quotes | ||
| if (contains(arg, ' ')) { |
There was a problem hiding this comment.
ditto here, a /\s/.test(arg) should work?
| { | ||
| "compilerOptions": { | ||
| "lib": ["es2023"], | ||
| "types": ["node"], |
There was a problem hiding this comment.
Your IDE might've used a newer TS version than the one installed in the project.
This will be necessary when that upgrade is finally done, but I'd like to revert this one
Background & Problem
When using
--passthrough-arguments(-P) on Windows,concurrentlyrelies onshell-quoteto escape arguments. However, the current escaping logic is too eager, causing several issues:=and@are incorrectly escaped (e.g.,--tags=@foobecomes--tags\=\@foo), which corrupts the arguments passed to the child process.shell-quoteuses POSIX single quotes''to wrap arguments containing spaces. However, Windowscmd.exedoes not recognize single quotes, causing arguments to be split and broken.C:\Program Files\, the C-Runtime parses the trailing\"as an escaped literal quote, breaking the argument.(Related issues: #398, #487)
Fix
This PR introduces a platform-specific quoting strategy, referencing the implementation of
shell-args:winShellQuotelogic. It replaces the POSIX-basedquote(), using double quotes""for arguments with spaces and avoiding unnecessary escaping for=and@.shell-quotebehavior to ensure no regressions.