From 83eb6332c7fca31f2728949a55b5b74465ddc6ee Mon Sep 17 00:00:00 2001 From: jackple <359310444@qq.com> Date: Wed, 13 Sep 2023 08:48:20 +0800 Subject: [PATCH] chore: code format --- packages/electron-updater/src/NsisUpdater.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/electron-updater/src/NsisUpdater.ts b/packages/electron-updater/src/NsisUpdater.ts index 1a02fefcd72..41339441d0c 100644 --- a/packages/electron-updater/src/NsisUpdater.ts +++ b/packages/electron-updater/src/NsisUpdater.ts @@ -156,11 +156,15 @@ export class NsisUpdater extends BaseUpdater { // https://github.com/electron-userland/electron-builder/issues/1129 // Node 8 sends errors: https://nodejs.org/dist/latest-v8.x/docs/api/errors.html#errors_common_system_errors const errorCode = (e as NodeJS.ErrnoException).code - this._logger.info(`Cannot run installer: error code: ${errorCode}, error message: "${e.message}", will be executed again using elevate if EACCES, and will try to use electron.shell.openItem if ENOENT`) + this._logger.info( + `Cannot run installer: error code: ${errorCode}, error message: "${e.message}", will be executed again using elevate if EACCES, and will try to use electron.shell.openItem if ENOENT` + ) if (errorCode === "UNKNOWN" || errorCode === "EACCES") { callUsingElevation() - } else if (errorCode === 'ENOENT') { - require("electron").shell.openPath(options.installerPath).catch((err: Error) => this.dispatchError(err)) + } else if (errorCode === "ENOENT") { + require("electron") + .shell.openPath(options.installerPath) + .catch((err: Error) => this.dispatchError(err)) } else { this.dispatchError(e) }