Fix the failure of compilation caused by spaces where nodejs is located

This commit is contained in:
Tlntin
2023-02-25 10:56:01 +08:00
parent cc815ca8d1
commit b18efd3e16
5 changed files with 11 additions and 11 deletions

View File

@@ -46,7 +46,7 @@ export default class LinuxBuilder implements IBuilder {
const { name } = options;
await mergeTauriConfig(url, options, tauriConf);
await shellExec(`cd ${npmDirectory} && npm install && npm run build`);
await shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
let arch: string;
if (process.arch === "x64") {

View File

@@ -41,10 +41,10 @@ export default class MacBuilder implements IBuilder {
await mergeTauriConfig(url, options, tauriConf);
let dmgName: string;
if (options.multiArch) {
await shellExec(`cd ${npmDirectory} && npm install && npm run build:mac`);
await shellExec(`cd "${npmDirectory}" && npm install && npm run build:mac`);
dmgName = `${name}_${tauriConf.package.version}_universal.dmg`;
} else {
await shellExec(`cd ${npmDirectory} && npm install && npm run build`);
await shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
let arch = "x64";
if (process.arch === "arm64") {
arch = "aarch64";

View File

@@ -45,7 +45,7 @@ export default class WinBuilder implements IBuilder {
await mergeTauriConfig(url, options, tauriConf);
await shellExec(`cd ${npmDirectory} && npm install && npm run build`);
await shellExec(`cd "${npmDirectory}" && npm install && npm run build`);
const language = tauriConf.tauri.bundle.windows.wix.language[0];
const arch = process.arch;
const msiName = `${name}_${tauriConf.package.version}_${arch}_${language}.msi`;