Fix path separator on Windows Powershell

This commit is contained in:
Sander Declerck 2025-12-15 17:50:38 +01:00
parent 4623f3eff8
commit eb59e98785
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,7 @@
# Use cross-platform path separator (: on Unix, ; on Windows) # Use cross-platform path separator (: on Unix, ; on Windows)
$pathSeparator = if ($IsWindows) { ';' } else { ':' } # $IsWindows is only available in PowerShell Core 6.0+. If it doesn't exist, assume Windows PowerShell
$isWindowsPlatform = if (Test-Path variable:IsWindows) { $IsWindows } else { $true }
$pathSeparator = if ($isWindowsPlatform) { ';' } else { ':' }
$safeChainBin = Join-Path (Join-Path $HOME '.safe-chain') 'bin' $safeChainBin = Join-Path (Join-Path $HOME '.safe-chain') 'bin'
$env:PATH = "$env:PATH$pathSeparator$safeChainBin" $env:PATH = "$env:PATH$pathSeparator$safeChainBin"

View file

@ -1,5 +1,7 @@
# Use cross-platform path separator (: on Unix, ; on Windows) # Use cross-platform path separator (: on Unix, ; on Windows)
$pathSeparator = if ($IsWindows) { ';' } else { ':' } # $IsWindows is only available in PowerShell Core 6.0+. If it doesn't exist, assume Windows PowerShell
$isWindowsPlatform = if (Test-Path variable:IsWindows) { $IsWindows } else { $true }
$pathSeparator = if ($isWindowsPlatform) { ';' } else { ':' }
$safeChainBin = Join-Path (Join-Path $HOME '.safe-chain') 'bin' $safeChainBin = Join-Path (Join-Path $HOME '.safe-chain') 'bin'
$env:PATH = "$env:PATH$pathSeparator$safeChainBin" $env:PATH = "$env:PATH$pathSeparator$safeChainBin"