diff --git a/package.json b/package.json index 3c44511..8c28b74 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "lowdb": "^1.0.0", "md5": "^2.2.1", "melody.css": "^1.0.2", - "picgo": "^1.1.8", + "picgo": "^1.1.10", "qiniu": "^7.1.1", "request": "^2.83.0", "request-promise": "^4.2.2", diff --git a/src/main/utils/picgoCoreIPC.js b/src/main/utils/picgoCoreIPC.js index 60b6923..64555f4 100644 --- a/src/main/utils/picgoCoreIPC.js +++ b/src/main/utils/picgoCoreIPC.js @@ -70,6 +70,7 @@ const handleGetPluginList = (ipcMain, STORE_PATH, CONFIG_PATH) => { list.push(obj) } event.sender.send('pluginList', list) + picgo.cmd.program.removeAllListeners() }) } @@ -81,6 +82,7 @@ const handlePluginInstall = (ipcMain, STORE_PATH, CONFIG_PATH) => { event.sender.send('installSuccess', notice.body[0].replace(/picgo-plugin-/, '')) }) pluginHandler.install([`picgo-plugin-${msg}`]) + picgo.cmd.program.removeAllListeners() }) } @@ -92,6 +94,7 @@ const handlePluginUninstall = (ipcMain, STORE_PATH, CONFIG_PATH) => { event.sender.send('installSuccess', notice.body[0].replace(/picgo-plugin-/, '')) }) pluginHandler.uninstall([`picgo-plugin-${msg}`]) + picgo.cmd.program.removeAllListeners() }) } diff --git a/yarn.lock b/yarn.lock index 4502c19..b92feab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6200,9 +6200,9 @@ performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" -picgo@^1.1.8: - version "1.1.9" - resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.1.9.tgz#0fb495a49f83fee759391966aca7dc0d6e8feac9" +picgo@^1.1.10: + version "1.1.10" + resolved "https://registry.yarnpkg.com/picgo/-/picgo-1.1.10.tgz#a80ab4f95059e05d96e7bf9ecef9074202539f87" dependencies: chalk "^2.4.1" commander "^2.17.0"