Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.74.2
- OS Version: Windows 11
Steps to Reproduce (on Windows):
- Have an
npm
task that starts a script. - In the User Preferences, set
"terminal.integrated.automationProfile.windows"
as such:This is an example; this also works with, e.g."terminal.integrated.automationProfile.windows": { "path": "nu.exe", "args": ["-c"], },
pwsh.exe
/["-Command"]
. - Run the task.
- VS Code will run
nu.exe -c /d /c yarn run name
rather thannu.exe -c "yarn run name"
.
This was marked as fixed in #93437, but it isn't. A workaround is given, but is IMO unacceptable. If I modify my shell in user settings, I shouldn't have to modify a tasks.json
that many users will use, and whose preferred shells are different. More importantly, a single shell can be specified, so /bin/sh
won't work for users on Windows, and cmd.exe
/ pwsh.exe
/ whatever won't work for users on Linux. This makes terminal.integrated.automationProfile.*
essentially useless.
Since terminal.integrated.automationProfile.*
takes an args
argument, why add unwanted arguments to it? I understand why defaults may be nice (e.g. set args
to ["-Command"]
when path
is pwsh.exe
), but if preferences are explicitly specified, why append new arguments to them if they only work with a single shell?
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
- Fix custom task shell doesn't work without manually passing in "run command" arg/flagmicrosoft/vscode
- Reland fix custom task shell doesn't work without manually passing in "run command" arg/flagmicrosoft/vscode
- TerminalTaskSystem: Add support for nushellmicrosoft/vscode
- TerminalTaskSystem: Fix addtion arguments for string commandmicrosoft/vscode
- Fix automation profile args being overridden by default shell argsmicrosoft/vscode
Activity
hptechdesign commentedon Mar 17, 2023
I'm running into this today, version 1.76.2 while trying to execute a shell script:
The terminal process "C:\msys64\msys2_shell.cmd -defterm -here -no-start -mingw64 /d /c .TransferBuild.sh" terminated with exit code: 127.
hackpascal commentedon Apr 27, 2023
I'm using Makefile Tools with MSYS2 build environment and the same bug occurs:
vscode version 1.77.3
settings.json:
Gn3po4g commentedon Dec 30, 2023
Version 1.85.1 still has this problem.

39 remaining items