File tree 1 file changed +16
-3
lines changed
1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,14 @@ impl Finder {
76
76
{
77
77
let path = PathBuf :: from ( & binary_name) ;
78
78
79
+ #[ cfg( feature = "tracing" ) ]
80
+ tracing:: debug!(
81
+ "query binary_name = {:?}, paths = {:?}, cwd = {:?}" ,
82
+ binary_name. as_ref( ) . to_string_lossy( ) ,
83
+ paths. as_ref( ) . map( |p| p. as_ref( ) . to_string_lossy( ) ) ,
84
+ cwd. as_ref( ) . map( |p| p. as_ref( ) . display( ) )
85
+ ) ;
86
+
79
87
let binary_path_candidates = match cwd {
80
88
Some ( cwd) if path. has_separator ( ) => {
81
89
#[ cfg( feature = "tracing" ) ]
@@ -100,10 +108,15 @@ impl Finder {
100
108
Either :: Right ( Self :: path_search_candidates ( path, paths) . into_iter ( ) )
101
109
}
102
110
} ;
103
-
104
- Ok ( binary_path_candidates
111
+ let ret = binary_path_candidates
105
112
. filter ( move |p| binary_checker. is_valid ( p) )
106
- . map ( correct_casing) )
113
+ . map ( correct_casing) ;
114
+ #[ cfg( feature = "tracing" ) ]
115
+ let ret = ret. map ( |p| {
116
+ tracing:: debug!( "found path {}" , p. display( ) ) ;
117
+ p
118
+ } ) ;
119
+ Ok ( ret)
107
120
}
108
121
109
122
#[ cfg( feature = "regex" ) ]
You can’t perform that action at this time.
0 commit comments