Commit 62567761 authored by Auto Backup's avatar Auto Backup

fix: 修复execWithShell函数,添加env参数继承当前环境变量

parent 5afdc415
...@@ -123,6 +123,7 @@ function execWithShell(command, shellPath) { ...@@ -123,6 +123,7 @@ function execWithShell(command, shellPath) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const options = { const options = {
shell: shellPath || true, shell: shellPath || true,
env: process.env, // 继承当前进程的环境变量,包括 PATH
windowsHide: true windowsHide: true
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment