Trying npm.exe on windows

This commit is contained in:
Igor Katson 2024-08-12 21:05:59 +01:00
parent 2b1601ee85
commit 1f75f88293
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -10,10 +10,16 @@ fn main() {
println!("cargo:rerun-if-changed={}", webui_src_dir.to_str().unwrap());
#[cfg(not(target_os = "windows"))]
let npm = "npm";
#[cfg(target_os = "windows")]
let npm = "npm.exe";
// Run "npm install && npm run build" in the webui directory
for (cmd, args) in [
("npm", ["install"].as_slice()),
("npm", ["run", "build"].as_slice()),
(npm, ["install"].as_slice()),
(npm, ["run", "build"].as_slice()),
] {
// Run "npm install" in the webui directory
let output = Command::new(cmd)