Skip to content

Commit 9715b36

Browse files
author
Philip Sampaio
committed
Fix check for Windows on PS 5.1
1 parent 8dc4af3 commit 9715b36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/elixir.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,8 @@ $allParams.AddRange($allOtherParams)
313313

314314
$binSuffix = ""
315315

316-
if ($isWindows) {
316+
# The variable is available after PowerShell 7.2. Previous to that, PS only worked on Windows.
317+
if ($isWindows -or ($null -eq $isWindows)) {
317318
$binSuffix = ".exe"
318319
}
319320

0 commit comments

Comments
 (0)