Fix $env:USERPROFILE in pwsh script for unix

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

View file

@ -2,7 +2,9 @@
#
# 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
function Write-Info {