Skip to content

Commit

Permalink
Initialise the IDE updater even when 'checkForUpdates' preference is …
Browse files Browse the repository at this point in the history
…false (#1490)
  • Loading branch information
Alberto Iannaccone authored Sep 26, 2022
1 parent 8380c82 commit 96cf09d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,17 @@ export class CheckForIDEUpdates extends Contribution {
}

override onReady(): void {
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
if (!checkForUpdates) {
return;
}
this.updater
.init(
this.preferences.get('arduino.ide.updateChannel'),
this.preferences.get('arduino.ide.updateBaseUrl')
)
.then(() => this.updater.checkForUpdates(true))
.then(() => {
if (!this.preferences['arduino.checkForUpdates']) {
return;
}
return this.updater.checkForUpdates(true);
})
.then(async (updateInfo) => {
if (!updateInfo) return;
const versionToSkip = await this.localStorage.getData<string>(
Expand Down

0 comments on commit 96cf09d

Please sign in to comment.