mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-22 12:01:39 -07:00
fix(auto-update): suppress npx nag for transient installs (#10276)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
This commit is contained in:
@@ -123,6 +123,24 @@ describe('handleAutoUpdate', () => {
|
||||
expect(mockSpawn).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
PackageManager.NPX,
|
||||
PackageManager.PNPX,
|
||||
PackageManager.BUNX,
|
||||
])('should suppress update notifications when running via %s', (packageManager) => {
|
||||
mockGetInstallationInfo.mockReturnValue({
|
||||
updateCommand: undefined,
|
||||
updateMessage: `Running via ${packageManager}, update not applicable.`,
|
||||
isGlobal: false,
|
||||
packageManager,
|
||||
});
|
||||
|
||||
handleAutoUpdate(mockUpdateInfo, mockSettings, '/root', mockSpawn);
|
||||
|
||||
expect(mockUpdateEventEmitter.emit).not.toHaveBeenCalled();
|
||||
expect(mockSpawn).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should emit "update-received" but not update if no update command is found', () => {
|
||||
mockGetInstallationInfo.mockReturnValue({
|
||||
updateCommand: undefined,
|
||||
|
||||
Reference in New Issue
Block a user