()
| 6 | } |
| 7 | |
| 8 | export function usingCmd(): boolean { |
| 9 | const comSpec: string | undefined = process.env.ComSpec; |
| 10 | // 'cmd.exe' is used as a fallback if process.env.ComSpec is unavailable. |
| 11 | if (!comSpec) { |
| 12 | return true; |
| 13 | } |
| 14 | |
| 15 | if (comSpec.indexOf("cmd.exe") > -1) { |
| 16 | return true; |
| 17 | } |
| 18 | return false; |
| 19 | } |