File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -442,17 +442,23 @@ impl StepDescription {
442
442
let paths: Vec < _ > = paths
443
443
. iter ( )
444
444
. map ( |p| {
445
+ // If the path does not exist, it may represent the name of a Step, like `test tidy`
446
+ if !p. exists ( ) {
447
+ return p. clone ( ) ;
448
+ }
445
449
// Get the canonical path, strip the prefix, and convert to a PathBuf.
446
450
match p. canonicalize ( ) {
447
451
Ok ( p) => p. strip_prefix ( & builder. src ) . unwrap_or ( & p) . to_owned ( ) ,
448
- Err ( _) => {
449
- panic ! ( "failed to canonicalize path: {:?}" , p) ;
452
+ Err ( e) => {
453
+ eprintln ! ( "ERROR: {:?}" , e) ;
454
+ panic ! ( "Due to the above error, failed to canonicalize path: {:?}" , p) ;
450
455
}
451
456
}
452
- } ) . collect ( ) ;
457
+ } )
458
+ . collect ( ) ;
453
459
454
460
// Convert Vec<PathBuf> to `Vec<&Path>`
455
- let mut paths: Vec < & Path > = paths. iter ( ) . map ( |p| p. as_ref ( ) ) . collect ( ) ;
461
+ let mut paths: Vec < & Path > = paths. iter ( ) . map ( |p| p. as_ref ( ) ) . collect ( ) ;
456
462
457
463
remap_paths ( & mut paths) ;
458
464
You can’t perform that action at this time.
0 commit comments