Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New version is always downloaded even if it has been downloaded already #5534

Closed
ramaralo opened this issue Jan 8, 2021 · 1 comment
Closed

Comments

@ramaralo
Copy link

ramaralo commented Jan 8, 2021

  • Version: 22.7.0
  • Electron Version: 11.1.0
  • Electron Type (current, beta, nightly): current
  • Target:

I'm using the auto-updater with the following configs:

import { autoUpdater } from "electron-updater";

autoUpdater.autoDownload = false;
autoUpdater.allowDowngrade = true;

Since autoDownload is set to false, I'm calling autoUpdater.downloadUpdate() if the server (defined via autoUpdater.setFeedURL()) responds with a new version available.

My expectation is that, if I call autoUpdater.downloadUpdate() several times, auto-updater will only download a specific version once.

However I see that the same version is always downloaded even if the update info doesn't change:

{
  version: '6.12.0-alpha.3',
  path: 'https://path/to/some/file.zip',
  sha512: '650011d0d734adef86efb90e9bd7d45da4a446dfdd70ba89dd258065da65954b24247ebee66821aa2c1d17f5fa61ef9c32c006ebeb0ae7576f7b566f7b0ecc33'
}

Is my expectation correct? Should auto-updater manage this?
I can see a related issue has been created before (#1788).

Thanks.

@ramaralo
Copy link
Author

Closing as we found that event download-progress is not being triggered twice so we are assuming that despite the download event is triggered, the download happens only once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant