-
Notifications
You must be signed in to change notification settings - Fork 37.4k
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
npmtask 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 namerather 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?