From 3663c71cd81c740c43ad2b5949843abd9eae68fb Mon Sep 17 00:00:00 2001 From: Rob Holt Date: Wed, 23 Oct 2019 14:48:55 -0700 Subject: [PATCH] Fix bug finding Windows PowerShell --- src/platform.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform.ts b/src/platform.ts index e092c14411..34271fa398 100644 --- a/src/platform.ts +++ b/src/platform.ts @@ -94,7 +94,7 @@ export function getDefaultPowerShellPath( exePath: path.join(item, "pwsh.exe"), })); - if (psCorePaths) { + if (psCorePaths && psCorePaths.length > 0) { return powerShellExePath = psCorePaths[0].exePath; } }