Merge pull request #16306 from desktop/Revert-update-error-fix

Revert "Merge pull request #15530 from desktop/always-show-a-message-…
This commit is contained in:
tidy-dev 2023-03-14 07:16:17 -04:00 committed by GitHub
commit 39beede13d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,14 +287,7 @@ export class App extends React.Component<IAppProps, IAppState> {
updateStore.onError(error => {
log.error(`Error checking for updates`, error)
// It is possible to obtain an error with no message. This was found to be
// the case on a windows instance where there was not space on the hard
// drive to download the installer. In this case, we want to override the
// error message so the user is not given a blank dialog.
const hasErrorMsg = error.message.trim().length > 0
this.props.dispatcher.postError(
hasErrorMsg ? error : new Error('Checking for updates failed.')
)
this.props.dispatcher.postError(error)
})
ipcRenderer.on('launch-timing-stats', (_, stats) => {