Skip to content

Commit

Permalink
feat(run)!: use PowerShell by default on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
umbopepato committed Apr 2, 2021
1 parent 1b437b6 commit bb64b3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resolve_shell.ts
Expand Up @@ -6,6 +6,9 @@ const OS_FALLBACK_SHELL = isWindows ? "cmd.exe" : "sh";

export function resolveShell(): string {
let shell = Deno.env.get(VR_SHELL);
if (!shell && isWindows) {
shell = "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe";
}
if (validateShellFile(shell)) return shell as string;
shell = Deno.env.get(OS_SHELL_ENV_NAME);
if (validateShellFile(shell)) return shell as string;
Expand Down

0 comments on commit bb64b3e

Please sign in to comment.