fixup target of 'all' can't be recognize in pake-cli

This commit is contained in:
Tlntin
2023-05-03 11:04:43 +08:00
parent 2612d773e7
commit c95d5df6d4
2 changed files with 12 additions and 3 deletions

View File

@@ -175,7 +175,11 @@ export async function mergeTauriConfig(
if (process.platform === "linux") {
delete tauriConf.tauri.bundle.deb.files;
if (["all", "deb", "appimage"].includes(options.targets)) {
tauriConf.tauri.bundle.targets = [options.targets];
if (options.targets === "all") {
tauriConf.tauri.bundle.targets = ["deb", "appimage"];
} else {
tauriConf.tauri.bundle.targets = [options.targets];
}
} else {
logger.warn("targets must be 'all', 'deb', 'appimage', we will use default 'all'");
}
@@ -279,7 +283,7 @@ export async function mergeTauriConfig(
break;
}
}
let bundleConf = {tauri: {bundle: tauriConf.tauri.bundle}};
await fs.writeFile(
configPath,