From 97bab31eb95facf3d188ef4b9390a50000e9670b Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 2 Aug 2026 23:15:19 -0700 Subject: [PATCH] test(windows): track the launcher's own-environment marker The #12046 fix moved ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER and ORCA_CLI_COMMAND off ProcessStartInfo.EnvironmentVariables, but this asset test still pinned the old dictionary writes and failed. Co-authored-by: Orca --- src/main/cli/windows-launcher-asset.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/cli/windows-launcher-asset.test.ts b/src/main/cli/windows-launcher-asset.test.ts index f491cb0771d..2eec4fee577 100644 --- a/src/main/cli/windows-launcher-asset.test.ts +++ b/src/main/cli/windows-launcher-asset.test.ts @@ -16,12 +16,15 @@ describe('packaged Windows CLI launcher asset', () => { const sourcePath = join(process.cwd(), 'native', 'windows-cli-launcher', 'OrcaCliLauncher.cs') const source = readFileSync(sourcePath, 'utf8') + // Why: the marker and command name must ride the launcher's own environment, never + // ProcessStartInfo's case-insensitive copy of a PATH/Path block (stablyai/orca#12046). expect(source).toContain( - 'startInfo.EnvironmentVariables["ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER"] = "1";' + 'Environment.SetEnvironmentVariable("ORCA_WINDOWS_PACKAGED_CLI_LAUNCHER", "1");' ) - expect(source).toContain('Environment.GetEnvironmentVariable("ORCA_CLI_COMMAND") == "orca-ide"') - expect(source).toContain('? "orca-ide"') - expect(source).toContain(': "orca";') + expect(source).toContain( + 'string requestedCliCommand = Environment.GetEnvironmentVariable("ORCA_CLI_COMMAND");' + ) + expect(source).toContain('requestedCliCommand == "orca-ide" ? "orca-ide" : "orca"') expect(source).toContain('child.WaitForExit();') expect(source).toContain('return child.ExitCode;') })