From e861f93597d69b976cad2872941d08d16b8b2a96 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sat, 3 Aug 2024 21:54:17 +0000 Subject: [PATCH] DO NOT MERGE: Try removing cygpath from run-make --- .../run-make-support/src/external_deps/cygpath.rs | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/tools/run-make-support/src/external_deps/cygpath.rs b/src/tools/run-make-support/src/external_deps/cygpath.rs index a666f5b1fe33..39f3939ea903 100644 --- a/src/tools/run-make-support/src/external_deps/cygpath.rs +++ b/src/tools/run-make-support/src/external_deps/cygpath.rs @@ -1,7 +1,5 @@ use std::path::Path; -use crate::command::Command; - /// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is /// available on the platform! /// @@ -19,18 +17,7 @@ use crate::command::Command; /// > -- *from [cygpath documentation](https://cygwin.com/cygwin-ug-net/cygpath.html)*. #[track_caller] #[must_use] +// FIXME: If try job succeeds, remove this function entirely. pub fn get_windows_path>(path: P) -> String { - // If the path looks unixy then use cygpath otherwise return it unchanged. - // If cygpath fails then fallback to just using the path as given. - if path.as_ref().starts_with("/") { - let mut cygpath = Command::new("cygpath"); - cygpath.arg("-w"); - cygpath.arg(path.as_ref()); - let output = cygpath.run(); - if output.status().success() { - // cygpath -w can attach a newline - return output.stdout_utf8().trim().to_string(); - } - } path.as_ref().to_str().unwrap().into() }