File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ maintenance = { status = "passively-maintained" }
1919version-sync = " 0.9"
2020
2121[target .'cfg(target_os = "linux")' .dependencies ]
22+ bstr = " 0.2"
2223wsl = " 0.1"
2324
2425[target .'cfg(windows)' .dependencies ]
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ fn is_wsl() -> bool {
180180
181181#[ cfg( target_os = "linux" ) ]
182182fn wsl_to_windows_path ( path : & OsStr ) -> Option < OsString > {
183+ use bstr:: ByteSlice ;
183184 use std:: os:: unix:: ffi:: OsStringExt ;
184185
185186 let output = Command :: new ( "wslpath" )
@@ -195,7 +196,7 @@ fn wsl_to_windows_path(path: &OsStr) -> Option<OsString> {
195196 return None ;
196197 }
197198
198- Some ( OsString :: from_vec ( output. stdout ) )
199+ Some ( OsString :: from_vec ( output. stdout . trim_end ( ) . to_vec ( ) ) )
199200}
200201
201202#[ cfg( not( target_os = "linux" ) ) ]
You can’t perform that action at this time.
0 commit comments