fix(server): pick up newly installed provider CLIs on Windows refresh #6356
Closedfraineralex(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/6356/headopened View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- @@ -269,3 +269,12 @@269269 throw new Error(`Unsupported environment variable name: ${name}`);270270 }271271272+ const valueStatements =273+ name === "PATH"274+ ? [275+ "$machine = [Environment]::GetEnvironmentVariable('PATH', 'Machine')",276+ "$user = [Environment]::GetEnvironmentVariable('PATH', 'User')",277+ "$parts = @()",278+ "if ($null -ne $machine -and $machine.Length -gt 0) { $parts += $machine }",279+ "if ($null -ne $user -and $user.Length -gt 0) { $parts += $user }",280+ "$value = $parts -join ';'",@@ -488,3 +490,4 @@488490 const refreshInstance = Effect.fn("refreshInstance")(function* (489491 instanceId: ProviderInstanceId,490492 ) {493+ yield* fixPath();@@ -470,3 +471,4 @@470471 });471472472473 const refresh = Effect.fn("refresh")(function* (provider?: ProviderDriverKind) {474+ yield* fixPath();
- @@ -470,3 +471,4 @@470471 });471472472473 const refresh = Effect.fn("refresh")(function* (provider?: ProviderDriverKind) {474+ yield* fixPath();
- @@ -269,3 +269,14 @@269269 throw new Error(`Unsupported environment variable name: ${name}`);270270 }271271272+ const valueStatements =273+ name === "PATH"274+ ? [275+ "$machine = [Environment]::GetEnvironmentVariable('PATH', 'Machine')",276+ "$user = [Environment]::GetEnvironmentVariable('PATH', 'User')",277+ "$parts = @()",278+ "if ($null -ne $machine -and $machine.Length -gt 0) { $parts += $machine }",279+ "if ($null -ne $user -and $user.Length -gt 0) { $parts += $user }",280+ "$value = $parts -join ';'",281+ ]282+ : [`$value = [Environment]::GetEnvironmentVariable('${name}')`];
CDVolvik(GitHub profile, opens in a new tab) requested changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
1ba2d862-a193-444d-b64f-be7c2908eba1You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share