Specify paths and shell on Windows#55694
Conversation
333fred
left a comment
There was a problem hiding this comment.
I'll try to check this out and test later today.
| "type": "shell", | ||
| "windows": { | ||
| "command": "./build.cmd" | ||
| "command": "${workspaceFolder}/build.cmd" |
There was a problem hiding this comment.
Why the differences between workspaceFolder and workspaceRoot?
There was a problem hiding this comment.
Actually, I think these should all be workspaceFolder. https://code.visualstudio.com/docs/editor/variables-reference#_why-isnt-workspaceroot-documented
There was a problem hiding this comment.
Whoops. The inconsistency was just that this was done in two parts, over two days, on two machines, and I picked a different thing to copy and paste each time it seems.
Great catch on the workspaceRoot being deprecated though, I'll update all of the existing uses too.
| // See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
| // for the documentation about the tasks.json format | ||
| "version": "2.0.0", | ||
| "windows": { |
There was a problem hiding this comment.
What does this actually control? Does it control what terminal is used when I hit ctrl+` on Windows? Or just what shell these tasks run in?
There was a problem hiding this comment.
Just what shell is used to run tasks in.
My default terminal in VS Code is bash, but I'm on Windows so VS Code uses windows slashes, and generally results in pain. These changes fix things by forcing
cmd.exeusage on Windows, and specifying the absolute path of some commands.Would love someone to validate that I haven't broken anything, especially on non-Windows (@333fred)