Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): resolve claude executable on windows #4896

Closedshubhu121(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/4896/headopened View on GitHub

Showing 1 changed file with 11 additions and 0 deletions.

x
0 of 1 viewed, 1 left
11 additions and 0 deletionsapps/desktop/src/shell/DesktopShellEnvironment.tsModified
View file
@@ -242,6 +242,17 @@
"$ErrorActionPreference = 'Stop'",
...names.flatMap((name) => {
+ if (name.toUpperCase() === "PATH") {
+ return [
+ `Write-Output '${startMarker(name)}'`,
+ `$machineValue = [Environment]::GetEnvironmentVariable('${name}', 'Machine')`,
+ `$userValue = [Environment]::GetEnvironmentVariable('${name}', 'User')`,
+ `$processValue = [Environment]::GetEnvironmentVariable('${name}')`,
+ `$merged = ($processValue, $machineValue, $userValue | Where-Object { $null -ne $_ -and $_.Length -gt 0 }) -join ';'`,
+ "if ($null -ne $merged -and $merged.Length -gt 0) { Write-Output $merged }",
+ `Write-Output '${endMarker(name)}'`,
+ ];
+ }
return [
`Write-Output '${startMarker(name)}'`,
`$value = [Environment]::GetEnvironmentVariable('${name}')`,