fix: panic if target unknown

This commit is contained in:
Max Coppen 2022-11-01 18:19:17 +01:00
parent d961bf6fae
commit fdf0e608dc

View file

@ -13,17 +13,19 @@ fn main() {
"tauri/tooling/api/src/mocks.ts",
];
if cfg!(target_os = "windows") {
if cfg!(windows) {
/* Use cmd if the target is windows */
Command::new("cmd")
.args(&["/C", "esbuild"])
.args(&sargs)
.output()
.unwrap();
} else {
} else if cfg!(unix) {
Command::new("esbuild")
.args(&sargs)
.output()
.unwrap();
};
} else {
panic!("Unsupported build target");
}
}