浏览代码

fix(cli.rs): build on Windows

Lucas Nogueira 3 年之前
父节点
当前提交
5e7611aaa7
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      tooling/cli.rs/src/info.rs

+ 5 - 1
tooling/cli.rs/src/info.rs

@@ -100,7 +100,11 @@ fn crate_latest_version(name: &str) -> Option<String> {
 #[allow(clippy::let_and_return)]
 #[allow(clippy::let_and_return)]
 fn cross_command(bin: &str) -> Command {
 fn cross_command(bin: &str) -> Command {
   #[cfg(target_os = "windows")]
   #[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"))]
   #[cfg(not(target_os = "windows"))]
   let cmd = Command::new(bin);
   let cmd = Command::new(bin);
   cmd
   cmd