(env: NodeJS.ProcessEnv = process.env)
| 11 | } |
| 12 | |
| 13 | function windowsPowerShellPath(env: NodeJS.ProcessEnv = process.env): string { |
| 14 | const systemRoot = (env.SystemRoot ?? env.windir ?? "C:\\Windows").trim(); |
| 15 | if (!systemRoot) { |
| 16 | return "powershell.exe"; |
| 17 | } |
| 18 | return path.win32.join( |
| 19 | systemRoot, |
| 20 | "System32", |
| 21 | "WindowsPowerShell", |
| 22 | "v1.0", |
| 23 | "powershell.exe", |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | export function shellPathDelimiter(platform: NodeJS.Platform = process.platform): string { |
| 28 | return platform === "win32" ? ";" : ":"; |
no outgoing calls
no test coverage detected