fixup some bug

This commit is contained in:
Tlntin
2023-04-10 22:31:56 +08:00
parent 460f97f889
commit 416f84a1a3
4 changed files with 12 additions and 12 deletions

View File

@@ -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") {

View File

@@ -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 {

View File

@@ -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;

12
dist/cli.js vendored
View File

@@ -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") {