question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[electron-updater] Expose location of cacheDir

See original GitHub issue

Use case: When installing an update is unsuccessful, it would be possible to provide user where to save the latest downloaded installer to install it manually.

So it would be nice to have the full path to the downloaded installer, or at least a location where updates are downloaded.

Workaround:

// @ts-ignore
const cacheDir: string = autoUpdater.downloadedUpdateHelper.cacheDir);

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

11reactions
DovydasNavickascommented, Jul 4, 2018

The use case is quite simple: The auto updater fails (for Ubuntu in this case), because it lacks permissions or some other reason. We want to give user exactly that: “An aut-update has failed. Please try again or download here and install it manually.”

Saying that auto-updater fails only when users quickly shut down or sleep their PCs is more than optimistic, cause’ there might be gazillion of errors with permissions, network and many more.

Thus, it’d be nice to have the API to get:

  • full download URL
  • location where file was saved

This way we can solve the problem without digging into internal stuff by going around TypeScript with // @ts-ignore 👍

5reactions
develarcommented, Nov 8, 2018

update-downloaded event now has property downloadedFile.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating electron's update server value with an app update
... cache dir: C:\Users\USERNAME\AppData\Local\APPNAME-updater Cached update sha512 checksum doesn't match the latest available update.
Read more >
cache dir | Data Version Control - DVC
cache dir. Set/unset the cachecache directory location intuitively (compared to using dvc config cache ), or shows the current configured value.
Read more >
Access app-specific files - Android Developers
Your app accesses a file in this directory using the cacheDir property of a context ... To remove a file from the cache...
Read more >
Changing the location of temporary files
By default, temporary files are stored in the following location: <Data360Analyze data directory>/data-<port number>/executions.
Read more >
find-cache-dir - npm
Finds the common standard cache directory. Latest version: 4.0.0, last published: 2 months ago. Start using find-cache-dir in your project ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found