diff --git a/bin/builders/LinuxBuilder.ts b/bin/builders/LinuxBuilder.ts index 16671db..369db2a 100644 --- a/bin/builders/LinuxBuilder.ts +++ b/bin/builders/LinuxBuilder.ts @@ -56,10 +56,10 @@ export default class LinuxBuilder implements IBuilder { fs.copyFile(project_cn_conf, project_conf); const _ = await shellExec( - `cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build` + `cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build` ); } else { - const _ = await shellExec(`cd ${npmDirectory} && npm install && npm run build`); + const _ = await shellExec(`cd "${npmDirectory}" && npm install && npm run build`); } let arch: string; if (process.arch === "x64") { diff --git a/bin/builders/MacBuilder.ts b/bin/builders/MacBuilder.ts index 331b91b..1c22f1e 100644 --- a/bin/builders/MacBuilder.ts +++ b/bin/builders/MacBuilder.ts @@ -51,10 +51,10 @@ export default class MacBuilder implements IBuilder { fs.copyFile(project_cn_conf, project_conf); const _ = await shellExec( - `cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build:mac` + `cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build:mac` ); } else { - const _ = await shellExec(`cd ${npmDirectory} && npm install && npm run build:mac`); + const _ = await shellExec(`cd "${npmDirectory}" && npm install && npm run build:mac`); } dmgName = `${name}_${tauriConf.package.version}_universal.dmg`; } else { diff --git a/bin/builders/WinBulider.ts b/bin/builders/WinBulider.ts index a1c95e0..15f65e5 100644 --- a/bin/builders/WinBulider.ts +++ b/bin/builders/WinBulider.ts @@ -57,10 +57,10 @@ export default class WinBuilder implements IBuilder { fs.copyFile(project_cn_conf, project_conf); const _ = await shellExec( - `cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build` + `cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build` ); } else { - const _ = await shellExec(`cd ${npmDirectory} && npm install && npm run build`); + const _ = await shellExec(`cd "${npmDirectory}" && npm install && npm run build`); } const language = tauriConf.tauri.bundle.windows.wix.language[0]; const arch = process.arch; diff --git a/dist/cli.js b/dist/cli.js index 7573096..6bfdd3e 100644 --- a/dist/cli.js +++ b/dist/cli.js @@ -2309,10 +2309,10 @@ class MacBuilder { const project_cn_conf = path.join(rust_project_dir, "cn_config.bak"); const project_conf = path.join(rust_project_dir, "config"); fs$1.copyFile(project_cn_conf, project_conf); - yield shellExec(`cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build:mac`); + yield shellExec(`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build:mac`); } else { - yield shellExec(`cd ${npmDirectory} && npm install && npm run build:mac`); + yield shellExec(`cd "${npmDirectory}" && npm install && npm run build:mac`); } dmgName = `${name}_${tauriConf.package.version}_universal.dmg`; } @@ -2388,10 +2388,10 @@ class WinBuilder { const project_cn_conf = path.join(rust_project_dir, "cn_config.bak"); const project_conf = path.join(rust_project_dir, "config"); fs$1.copyFile(project_cn_conf, project_conf); - yield shellExec(`cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build`); + yield shellExec(`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build`); } else { - yield shellExec(`cd ${npmDirectory} && npm install && npm run build`); + yield shellExec(`cd "${npmDirectory}" && npm install && npm run build`); } const language = tauriConf.tauri.bundle.windows.wix.language[0]; const arch = process.arch; @@ -2444,10 +2444,10 @@ class LinuxBuilder { const project_cn_conf = path.join(rust_project_dir, "cn_config.bak"); const project_conf = path.join(rust_project_dir, "config"); fs$1.copyFile(project_cn_conf, project_conf); - yield shellExec(`cd ${npmDirectory} && npm install --registry=https://registry.npmmirror.com && npm run build`); + yield shellExec(`cd "${npmDirectory}" && npm install --registry=https://registry.npmmirror.com && npm run build`); } else { - yield shellExec(`cd ${npmDirectory} && npm install && npm run build`); + yield shellExec(`cd "${npmDirectory}" && npm install && npm run build`); } let arch; if (process.arch === "x64") {