File tree Expand file tree Collapse file tree 2 files changed +4
-18
lines changed
Expand file tree Collapse file tree 2 files changed +4
-18
lines changed Original file line number Diff line number Diff line change @@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
2929 . split ( '\n' )
3030 {
3131 if let Some ( stripped) = line. strip_prefix ( "include:" ) {
32- cmd. arg ( "--also-match" ) . arg ( absolutelyfy ( stripped ) ) ;
32+ cmd. arg ( "--also-match=" . to_owned ( ) + stripped ) ;
3333 } else if let Some ( stripped) = line. strip_prefix ( "exclude:" ) {
34- cmd. arg ( "--exclude" ) . arg ( stripped) ;
34+ cmd. arg ( "--exclude=" . to_owned ( ) + stripped) ;
3535 }
3636 }
3737 let exit = & cmd. spawn ( ) ?. wait ( ) ?;
3838 std:: process:: exit ( exit. code ( ) . unwrap_or ( 1 ) )
3939}
40-
41- // converts the relative path `stripped` to an absolute path by prepending the working directory
42- fn absolutelyfy ( stripped : & str ) -> String {
43- let pwd = env:: current_dir ( ) . unwrap ( ) ;
44-
45- pwd. join ( stripped) . into_os_string ( ) . into_string ( ) . unwrap ( )
46- }
Original file line number Diff line number Diff line change @@ -29,18 +29,11 @@ fn main() -> std::io::Result<()> {
2929 . split ( '\n' )
3030 {
3131 if let Some ( stripped) = line. strip_prefix ( "include:" ) {
32- cmd. arg ( "--also-match" ) . arg ( absolutelyfy ( stripped ) ) ;
32+ cmd. arg ( "--also-match=" . to_owned ( ) + stripped ) ;
3333 } else if let Some ( stripped) = line. strip_prefix ( "exclude:" ) {
34- cmd. arg ( "--exclude" ) . arg ( stripped) ;
34+ cmd. arg ( "--exclude=" . to_owned ( ) + stripped) ;
3535 }
3636 }
3737 let exit = & cmd. spawn ( ) ?. wait ( ) ?;
3838 std:: process:: exit ( exit. code ( ) . unwrap_or ( 1 ) )
3939}
40-
41- // converts the relative path `stripped` to an absolute path by prepending the working directory
42- fn absolutelyfy ( stripped : & str ) -> String {
43- let pwd = env:: current_dir ( ) . unwrap ( ) ;
44-
45- pwd. join ( stripped) . into_os_string ( ) . into_string ( ) . unwrap ( )
46- }
You can’t perform that action at this time.
0 commit comments