visual studio code - What does the isShellCommand property actually do and how should you use it? -
what isshellcommand property , how should use it?
the description when hovering says:
"specifies whether command shell command or external programm. defaults false if omitted"
and in https://code.visualstudio.com/docs/editor/tasks mention in example with:
"we want run gulp command in shell (vs code directly executing it) used isshellcommand"
so difference between shell command vs external program?
does running isshellcommand = false mean vscode not "directly executing it" meaning run "command" , don´t listen output (because ran external command?) in turn means cannot use problem matchers.
or if setting isshellcommand = true mean vscode "directly executing it" , keep track of , listen output generated can use problem matchers etc integrate vscode?
considering example below using tsc compile 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 following task.json
{ "version": "0.1.0", // command tsc. assumes tsc has been installed using npm install -g typescript "command": "tsc", // command shell script "isshellcommand": false, "args": ["-v"], "problemmatcher": "$tsc" }
if run task output version:
message ts6029: version 1.4.0.0
and if change isshellcommand true output same
message ts6029: version 1.4.0.0
so thought if change calling external program setting isshellcommand true , calling .exe file not give me output does?!.
{ ... "command": "tsc.cmd" "isshellcommand": true, } message ts6029: version 1.4.0.0
so under circumstances should set isshellcommand true/false?
been trying find more information in vscode documents not find anything, if point me resources besides https://code.visualstudio.com/docs grateful aswell. thanks
found answer(s) seeking in: https://github.com/microsoft/vscode-docs/blob/master/docs/editor/tasks_appendix.md
/** * specifies whether command shell command , therefore must * executed in shell interpreter (e.g. cmd.exe, bash, ...). * * defaults false if omitted. */ isshellcommand?: boolean;
Comments
Post a Comment