Check disableUpdateNag before making network request

This commit is contained in:
Alexander Farber 2025-12-24 11:16:22 +01:00 committed by Mingholy
parent bd900d3668
commit 30ac136a93
2 changed files with 0 additions and 12 deletions

View file

@ -94,14 +94,6 @@ describe('handleAutoUpdate', () => {
expect(mockSpawn).not.toHaveBeenCalled();
});
it('should do nothing if update nag is disabled', () => {
mockSettings.merged.general!.disableUpdateNag = true;
handleAutoUpdate(mockUpdateInfo, mockSettings, '/root', mockSpawn);
expect(mockGetInstallationInfo).not.toHaveBeenCalled();
expect(mockUpdateEventEmitter.emit).not.toHaveBeenCalled();
expect(mockSpawn).not.toHaveBeenCalled();
});
it('should emit "update-received" but not update if auto-updates are disabled', () => {
mockSettings.merged.general!.disableAutoUpdate = true;
mockGetInstallationInfo.mockReturnValue({

View file

@ -24,10 +24,6 @@ export function handleAutoUpdate(
return;
}
if (settings.merged.general?.disableUpdateNag) {
return;
}
const installationInfo = getInstallationInfo(
projectRoot,
settings.merged.general?.disableAutoUpdate ?? false,