Skip to content

Commit e861f93

Browse files
committed
DO NOT MERGE: Try removing cygpath from run-make
1 parent 27a378f commit e861f93

File tree

1 file changed

+1
-14
lines changed
  • src/tools/run-make-support/src/external_deps

1 file changed

+1
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use std::path::Path;
22

3-
use crate::command::Command;
4-
53
/// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is
64
/// available on the platform!
75
///
@@ -19,18 +17,7 @@ use crate::command::Command;
1917
/// > -- *from [cygpath documentation](https://cygwin.com/cygwin-ug-net/cygpath.html)*.
2018
#[track_caller]
2119
#[must_use]
20+
// FIXME: If try job succeeds, remove this function entirely.
2221
pub fn get_windows_path<P: AsRef<Path>>(path: P) -> String {
23-
// If the path looks unixy then use cygpath otherwise return it unchanged.
24-
// If cygpath fails then fallback to just using the path as given.
25-
if path.as_ref().starts_with("/") {
26-
let mut cygpath = Command::new("cygpath");
27-
cygpath.arg("-w");
28-
cygpath.arg(path.as_ref());
29-
let output = cygpath.run();
30-
if output.status().success() {
31-
// cygpath -w can attach a newline
32-
return output.stdout_utf8().trim().to_string();
33-
}
34-
}
3522
path.as_ref().to_str().unwrap().into()
3623
}

0 commit comments

Comments
 (0)