From 9ef77b9b4becb558f75e0c9fd80cc4896036a461 Mon Sep 17 00:00:00 2001 From: Carlos Rodrigues Date: Thu, 8 Jun 2017 15:42:16 +0100 Subject: [PATCH] fix(electron-updater): check for EACCES error when try to install on auto updated windows (#1636) --- packages/electron-updater/src/NsisUpdater.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/electron-updater/src/NsisUpdater.ts b/packages/electron-updater/src/NsisUpdater.ts index 07cbf935551..63d371ec37a 100644 --- a/packages/electron-updater/src/NsisUpdater.ts +++ b/packages/electron-updater/src/NsisUpdater.ts @@ -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 ((e).code === "UNKNOWN") { + if ((e).code === "UNKNOWN" || (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 {