Skip to content

Commit a661a10

Browse files
committed
fix: address PR review findings
Reject unsupported Windows architectures in the install script instead of defaulting to x64, and assert that cancelling the API key prompt writes no configuration.
1 parent 0a01fd0 commit a661a10

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

apps/pythinker-code/test/tui/commands/auth.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ describe('connectCatalogProvider credential acquisition', () => {
121121
await connectCatalogProvider(host, 'anthropic', CATALOG_ENTRY);
122122

123123
expect(current().providers['anthropic']).toBeUndefined();
124+
expect(host.harness.setConfig).not.toHaveBeenCalled();
124125
expect(promptModelSelectionForCatalog).not.toHaveBeenCalled();
125126
});
126127
});

apps/pythinker-web/public/install.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,12 @@ if ([System.Environment]::OSVersion.Platform -ne [System.PlatformID]::Win32NT) {
455455
if (-not $Version) { $Version = Get-LatestVersion }
456456
$Version = $Version.TrimStart('v')
457457

458-
$archLabel = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq [System.Runtime.InteropServices.Architecture]::Arm64) { 'arm64' } else { 'x64' }
458+
$architecture = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
459+
$archLabel = switch ($architecture) {
460+
([System.Runtime.InteropServices.Architecture]::Arm64) { 'arm64' }
461+
([System.Runtime.InteropServices.Architecture]::X64) { 'x64' }
462+
default { Fail "unsupported Windows architecture: $architecture (need x64 or arm64)" }
463+
}
459464
$target = "win32-$archLabel"
460465

461466
$asset = "pythinker-code-$target.zip"

0 commit comments

Comments
 (0)