mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix path separator on Windows Powershell
This commit is contained in:
parent
4623f3eff8
commit
eb59e98785
2 changed files with 6 additions and 2 deletions
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue