未验证 提交 feb87336 编写于 作者: G GitSquared

Upgrade which to v2.0.1 - support async promises

上级 6c88699e
......@@ -34,22 +34,9 @@ const ipc = electron.ipcMain;
const path = require("path");
const url = require("url");
const fs = require("fs");
const realWhich = require("which");
const which = require("which");
const Terminal = require("./classes/terminal.class.js").Terminal;
// Promisify 'which' module
const which = exec => {
return new Promise((resolve, reject) => {
realWhich(exec, (er, resolvedPath) => {
if (er !== null) {
reject(er);
return;
}
resolve(resolvedPath);
})
});
};
ipc.on("log", (e, type, content) => {
signale[type](content);
});
......
......@@ -78,6 +78,16 @@
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"dependencies": {
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"default-shell": {
......@@ -459,6 +469,16 @@
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
},
"dependencies": {
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"requires": {
"isexe": "^2.0.0"
}
}
}
},
"execa": {
......@@ -569,9 +589,9 @@
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.1.tgz",
"integrity": "sha512-N7GBZOTswtB9lkQBZA4+zAXrjEIWAUOB93AvzUiudRzRxhUdLURQ7D/gAIMY1gatT/LTbmbcv8SiYazy3eYB7w==",
"requires": {
"isexe": "^2.0.0"
}
......
......@@ -37,7 +37,7 @@
"systeminformation": "4.14.11",
"tail": "2.0.3",
"username": "5.1.0",
"which": "1.3.1",
"which": "2.0.1",
"ws": "7.1.2",
"xterm": "4.0.2",
"xterm-addon-attach": "0.2.1",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册