Skip to content

Commit

Permalink
Fix isWindows check (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaspin authored Mar 8, 2022
1 parent 40d6299 commit 91ef5ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install-self-hosted-toolbox.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
$ErrorActionPreference = "Stop"

if ($IsWindows) {
# PowerShell Core 6.0+ has $isWindows set, but older versions don't.
# For those versions, we use the $env:OS variable, which is only set in Windows.
if ($IsWindows -or $env:OS) {
$ModulePath = $Env:PSModulePath.Split(";")[0]
} else {
$ModulePath = $Env:PSModulePath.Split(":")[0]
Expand Down

0 comments on commit 91ef5ef

Please sign in to comment.