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 <help@stably.ai>
This commit is contained in:
Neil
2026-08-02 23:15:19 -07:00
co-authored by Orca
parent 6954398d53
commit 97bab31eb9
+7 -4
View File
@@ -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;')
})