Fix $env:USERPROFILE in pwsh script for unix

This commit is contained in:
Sander Declerck 2025-12-10 13:55:08 +01:00
parent dace5f3845
commit 9c94fadfcc
No known key found for this signature in database

View file

@ -2,7 +2,9 @@
# #
# Usage with "iex (iwr {url} -UseBasicParsing)" --> See README.md # Usage with "iex (iwr {url} -UseBasicParsing)" --> See README.md
$InstallDir = Join-Path $env:USERPROFILE ".safe-chain\bin" # Use HOME on Unix, USERPROFILE on Windows (PowerShell Core is cross-platform)
$HomeDir = if ($env:HOME) { $env:HOME } else { $env:USERPROFILE }
$InstallDir = Join-Path $HomeDir ".safe-chain/bin"
# Helper functions # Helper functions
function Write-Info { function Write-Info {