File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,6 @@ fn next_in_path(target: &Path) -> Result<PathBuf> {
8585
8686 path. split ( ':' )
8787 . map ( |dir| Path :: new ( dir) . join ( target) )
88- // FIXME: check if it is executable
8988 . filter ( |path| path. is_file ( ) )
9089 . find ( |path| {
9190 // We need to compare it with the real path of the candidate executable to avoid
@@ -117,13 +116,10 @@ fn report(execution: Execution) -> Result<()> {
117116}
118117
119118fn into_execution ( path_buf : & Path ) -> Result < Execution > {
120- std:: env:: current_dir ( )
121- . with_context ( || "Cannot get current directory" )
122- . map ( |working_dir| Execution {
123- executable : path_buf. to_path_buf ( ) ,
124- // FIXME: substitute the executable name on the first position
125- arguments : std:: env:: args ( ) . collect ( ) ,
126- working_dir,
127- environment : std:: env:: vars ( ) . collect ( ) ,
128- } )
119+ Ok ( Execution {
120+ executable : path_buf. to_path_buf ( ) ,
121+ arguments : std:: env:: args ( ) . collect ( ) ,
122+ working_dir : std:: env:: current_dir ( ) ?,
123+ environment : std:: env:: vars ( ) . collect ( ) ,
124+ } )
129125}
You can’t perform that action at this time.
0 commit comments