From a03758d383fbc3cc5e9194eefdeedcd94308822c Mon Sep 17 00:00:00 2001 From: ardocrat Date: Fri, 20 Feb 2026 00:01:28 +0000 Subject: [PATCH] fix: webtunnel build - Fix build command execution on non-Windows Reviewed-on: https://code.gri.mw/GUI/grim/pulls/48 --- build.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/build.rs b/build.rs index 63e5a9a..a26cde2 100644 --- a/build.rs +++ b/build.rs @@ -51,16 +51,21 @@ fn main() { "amd64" }; // Run Webtunnel Go build. - let mut command = if env::consts::OS == "windows" { + let output = if env::consts::OS == "windows" { Command::new("./scripts/webtunnel.bat") + .arg(go_os) + .arg(go_arch) + .arg(webtunnel_file) + .output() } else { - Command::new("bash ./scripts/webtunnel.sh") + Command::new("bash") + .arg("./scripts/webtunnel.sh") + .arg(go_os) + .arg(go_arch) + .arg(webtunnel_file) + .output() }; - if let Ok(out) = command - .arg(go_os) - .arg(go_arch) - .arg(webtunnel_file) - .output() { + if let Ok(out) = output { if out.status.code().is_none() || out.status.code().unwrap() != 0 { panic!("webtunnel go build failed:\n{:?}", out); }