From 400d71416b8649d1d16bb8ca83f205a924d74fc8 Mon Sep 17 00:00:00 2001 From: VillanCh <188228725@qq.com> Date: Mon, 22 Nov 2021 23:06:42 +0800 Subject: [PATCH] fix error import --- app/main/handlers/upgradeUtil.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/main/handlers/upgradeUtil.js b/app/main/handlers/upgradeUtil.js index a24fee0dc3..ca792630fb 100644 --- a/app/main/handlers/upgradeUtil.js +++ b/app/main/handlers/upgradeUtil.js @@ -8,8 +8,6 @@ const https = require("https"); const requestProgress = require("request-progress"); const request = require("request"); const sudo = require("sudo-prompt"); -const {platform} = require("process"); -const {ca} = require("wait-on/exampleConfig"); const homeDir = path.join(os.homedir(), "yakit-projects"); const secretDir = path.join(homeDir, "auth"); @@ -400,14 +398,8 @@ module.exports = { return `${process.platform}-${process.arch}`; }) - // asyncinstallYakit wrapper - const asyncinstallYakit = (params) => { - return new Promise((resolve, reject) => { - shell.openPath(yakEngineDir) - }) - } ipcMain.handle("install-yakit", async (e, params) => { - return await asyncinstallYakit(params) + return shell.openPath(yakEngineDir) })