The description when hovering says:
"Specifies whether the command is a shell command or an external programm. Defaults to false if omitted"
And in https://code.visualstudio.com/Docs/editor/tasks they mention it in the example with:
"We want to run the gulp command in a shell (VS Code directly executing it) so we used isShellCommand"
Does running with isShellCommand = false mean that vsCode will not be "directly executing it" meaning it will run the "command" and don´t listen to any output from it (because it ran it as an external command?) which in turn means we cannot use problem matchers.
Or if setting isShellCommand = true does it mean that vscode is "directly executing it" and will keep track of it and listen to the output generated so we can use problem matchers etc to integrate with vsCode?
Considering the example below using tsc to compile a typescript project:
c:\Users\J\Code\vscode-project>where tsc
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.js
C:\Users\J\AppData\Roaming\npm\tsc
C:\Users\J\AppData\Roaming\npm\tsc.cmd
And the following task.json
{
"version": "0.1.0",
// The command is tsc. Assumes that tsc has been installed using npm install -g typescript
"command": "tsc",
// The command is a shell script
"isShellCommand": false,
"args": ["-v"],
"problemMatcher": "$tsc"
}
If I run the task now it will output version:
message TS6029: Version 1.4.0.0
And if I change isShellCommand to true it will output same
message TS6029: Version 1.4.0.0
So my thought was if I change to calling an external program by setting isShellCommand to true and calling an .exe file it will not give me any output but it does?!.
{
...
"command": "tsc.cmd"
"isShellCommand": true,
}
message TS6029: Version 1.4.0.0
Been trying to find more information about all this in vsCode documents but could not find anything, so if anyone could point me to any resources besides https://code.visualstudio.com/Docs I would be really grateful aswell. Thanks
Found the answer(s) I was seeking in: https://github.com/Microsoft/vscode-docs/blob/master/docs/editor/tasks_appendix.md
/**
* Specifies whether the command is a shell command and therefore must
* be executed in a shell interpreter (e.g. cmd.exe, bash, ...).
*
* Defaults to false if omitted.
*/
isShellCommand?: boolean;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With