Skip to content

Commit

Permalink
fix(electron-updater): check for EACCES error when try to install on …
Browse files Browse the repository at this point in the history
…auto updated windows (#1636)
  • Loading branch information
pikax authored and develar committed Jun 8, 2017
1 parent 69c3614 commit 9ef77b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-updater/src/NsisUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ export class NsisUpdater extends AppUpdater {
catch (e) {
// yes, such errors dispatched not as error event
// https://github.com/electron-userland/electron-builder/issues/1129
if ((<any>e).code === "UNKNOWN") {
if ((<any>e).code === "UNKNOWN" || (<any>e).code === "EACCES") { // Node 8 sends errors: https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#errors_common_system_errors
if (this.logger != null) {
this.logger.info("UNKNOWN error code on spawn, will be executed again using elevate")
this.logger.info("Access denied or UNKNOWN error code on spawn, will be executed again using elevate")
}

try {
Expand Down

0 comments on commit 9ef77b9

Please sign in to comment.