File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed
src/tools/run-make-support/src/external_deps Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change 11use 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.
2221pub 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}
You can’t perform that action at this time.
0 commit comments