浏览代码

fix build error on windows (#741)

o69mar 2 年之前
父节点
当前提交
dfa57c890d
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      build.rs

+ 7 - 1
build.rs

@@ -1,7 +1,13 @@
 use std::{
 use std::{
-	os::unix::process::ExitStatusExt,
 	process::{Command, ExitStatus, Output},
 	process::{Command, ExitStatus, Output},
 };
 };
+
+#[cfg(not(target_os = "windows"))]
+use std::os::unix::process::ExitStatusExt;
+
+#[cfg(target_os = "windows")]
+use std::os::windows::process::ExitStatusExt;
+
 fn main() {
 fn main() {
 	let output = String::from_utf8(
 	let output = String::from_utf8(
 		Command::new("git")
 		Command::new("git")