Skip to content

Commit 96cf09d

Browse files
author
Alberto Iannaccone
authored
Initialise the IDE updater even when 'checkForUpdates' preference is false (#1490)
1 parent 8380c82 commit 96cf09d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Diff for: arduino-ide-extension/src/browser/contributions/check-for-ide-updates.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,17 @@ export class CheckForIDEUpdates extends Contribution {
3737
}
3838

3939
override onReady(): void {
40-
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
41-
if (!checkForUpdates) {
42-
return;
43-
}
4440
this.updater
4541
.init(
4642
this.preferences.get('arduino.ide.updateChannel'),
4743
this.preferences.get('arduino.ide.updateBaseUrl')
4844
)
49-
.then(() => this.updater.checkForUpdates(true))
45+
.then(() => {
46+
if (!this.preferences['arduino.checkForUpdates']) {
47+
return;
48+
}
49+
return this.updater.checkForUpdates(true);
50+
})
5051
.then(async (updateInfo) => {
5152
if (!updateInfo) return;
5253
const versionToSkip = await this.localStorage.getData<string>(

0 commit comments

Comments
 (0)