Skip to content

Commit 016dcb9

Browse files
committed
Remove post-install verification check
The scenario where installCli() silently fails is very unlikely. Simplify by setting the flag unconditionally after install, consistent with the macOS approach.
1 parent 9c4dc52 commit 016dcb9

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

apps/studio/src/modules/cli/lib/tests/windows-installation-manager.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,24 +177,6 @@ describe.skipIf( isNonWindows )( 'WindowsCliInstallationManager', () => {
177177
expect( mockRegistrySet ).not.toHaveBeenCalled();
178178
expect( mockUpdateAppdata ).not.toHaveBeenCalled();
179179
} );
180-
181-
it( 'does not set cliAutoInstalled flag when install fails', async () => {
182-
// Registry PATH doesn't contain studio bin dir
183-
mockRegistryGet.mockImplementation(
184-
( _key: string, cb: ( err: Error | null, item?: { value: string } ) => void ) =>
185-
cb( null, { value: 'C:\\Windows\\system32' } )
186-
);
187-
mockRegistrySet.mockImplementation(
188-
( _key: string, _type: string, _value: string, cb: ( err: Error | null ) => void ) =>
189-
cb( null )
190-
);
191-
// Simulate failure: bin dir doesn't exist after install
192-
mockExistsSync.mockReturnValue( false );
193-
194-
await manager.autoInstallIfNeeded();
195-
196-
expect( mockUpdateAppdata ).not.toHaveBeenCalled();
197-
} );
198180
} );
199181
} );
200182

apps/studio/src/modules/cli/lib/windows-installation-manager.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ export class WindowsCliInstallationManager implements StudioCliInstallationManag
4848
}
4949

5050
await this.installCli();
51-
52-
if ( await this.isCliInstalled() ) {
53-
await updateAppdata( { cliAutoInstalled: true } );
54-
}
51+
await updateAppdata( { cliAutoInstalled: true } );
5552
}
5653

5754
async installCliWithConfirmation(): Promise< void > {

0 commit comments

Comments
 (0)