Skip to content

Commit

Permalink
fix(auto-updater): Log the raw version string (#4947)
Browse files Browse the repository at this point in the history
When the app updater fails because the version string can't be parsed, we are putting `latestVersion` into the logs, which we know is `null`. That's not too helpful, but putting the raw string from `updateInfo.version` is helpful because you might be able to see what's gone wrong with parsing it.
  • Loading branch information
mattjgalloway authored May 14, 2020
1 parent 39f6b84 commit 8f99057
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-updater/src/AppUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export abstract class AppUpdater extends EventEmitter {
private async isUpdateAvailable(updateInfo: UpdateInfo): Promise<boolean> {
const latestVersion = parseVersion(updateInfo.version)
if (latestVersion == null) {
throw newError(`This file could not be downloaded, or the latest version (from update server) does not have a valid semver version: "${latestVersion}"`, "ERR_UPDATER_INVALID_VERSION")
throw newError(`This file could not be downloaded, or the latest version (from update server) does not have a valid semver version: "${updateInfo.version}"`, "ERR_UPDATER_INVALID_VERSION")
}

const currentVersion = this.currentVersion
Expand Down Expand Up @@ -670,4 +670,4 @@ export interface TestOnlyUpdaterOptions {
platform: ProviderPlatform

isUseDifferentialDownload?: boolean
}
}

0 comments on commit 8f99057

Please sign in to comment.