From 5e7611aaa7a13513000b756f22b6352cd513fbc4 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sun, 6 Feb 2022 10:52:01 -0300 Subject: [PATCH] fix(cli.rs): build on Windows --- tooling/cli.rs/src/info.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tooling/cli.rs/src/info.rs b/tooling/cli.rs/src/info.rs index 8ab348ec8..92dc1fcdc 100644 --- a/tooling/cli.rs/src/info.rs +++ b/tooling/cli.rs/src/info.rs @@ -100,7 +100,11 @@ fn crate_latest_version(name: &str) -> Option { #[allow(clippy::let_and_return)] fn cross_command(bin: &str) -> Command { #[cfg(target_os = "windows")] - let cmd = Command::new("cmd").arg("/c").arg(bin); + let cmd = { + let mut cmd = Command::new("cmd"); + cmd.arg("/c").arg(bin); + cmd + }; #[cfg(not(target_os = "windows"))] let cmd = Command::new(bin); cmd