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 number Diff line number Diff line change 1
1
use std:: path:: Path ;
2
2
3
- use crate :: command:: Command ;
4
-
5
3
/// Use `cygpath -w` on a path to get a Windows path string back. This assumes that `cygpath` is
6
4
/// available on the platform!
7
5
///
@@ -19,18 +17,7 @@ use crate::command::Command;
19
17
/// > -- *from [cygpath documentation](https://cygwin.com/cygwin-ug-net/cygpath.html)*.
20
18
#[ track_caller]
21
19
#[ must_use]
20
+ // FIXME: If try job succeeds, remove this function entirely.
22
21
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
- }
35
22
path. as_ref ( ) . to_str ( ) . unwrap ( ) . into ( )
36
23
}
You can’t perform that action at this time.
0 commit comments