File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ if ($ShowHelp) {
1818$releaseVersion = " 2.0.1"
1919$releaseTag = " v$releaseVersion "
2020$releaseWheelUrl = " https://github.com/EvanProgramming/OpenKyrozen/releases/download/$releaseTag /openkyrozen-$releaseVersion -py3-none-any.whl"
21+ $homeDirectory = if ($env: HOME ) { $env: HOME } else { $env: USERPROFILE }
2122
2223Write-Output " "
2324Write-Output " ____ ____ _____ _ _ ____ _____ _ _ ____ _ _ "
@@ -33,7 +34,7 @@ if ($architecture -notin @("X64", "Arm64")) {
3334 Fail " Unsupported Windows architecture: $architecture "
3435}
3536
36- $stateDir = Join-Path $HOME " .kyrozen"
37+ $stateDir = Join-Path $homeDirectory " .kyrozen"
3738try {
3839 New-Item - ItemType Directory - Force - Path (Join-Path $stateDir " workspace" ) | Out-Null
3940 New-Item - ItemType Directory - Force - Path (Join-Path $stateDir " v2" ) | Out-Null
4748 Fail " GitHub release asset is unavailable: $releaseTag "
4849}
4950
50- $localBin = Join-Path $HOME " .local\bin"
51- $cargoBin = Join-Path $HOME " .cargo\bin"
51+ $localBin = Join-Path $homeDirectory " .local\bin"
52+ $cargoBin = Join-Path $homeDirectory " .cargo\bin"
5253$env: Path = " $localBin ;$cargoBin ;$env: Path "
5354
5455$uvCommand = Get-Command uv - ErrorAction SilentlyContinue
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ def test_powershell_installer_is_static_safe_and_parses_when_available(self):
8989 text = installer .read_text (encoding = "utf-8" )
9090 self .assertIn ('[Alias("Help")]' , text )
9191 self .assertIn ("$ShowHelp" , text )
92+ self .assertIn ("$homeDirectory = if ($env:HOME)" , text )
93+ self .assertNotIn ('Join-Path $HOME ".kyrozen"' , text )
9294 self .assertIn ("[Environment]::GetEnvironmentVariable(\" Path\" , \" User\" )" , text )
9395 self .assertIn ("SetEnvironmentVariable(\" Path\" " , text )
9496 self .assertIn ("tool install --python" , text )
You can’t perform that action at this time.
0 commit comments