File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 2828
2929use std:: collections:: { BTreeMap , HashSet , HashMap } ;
3030use std:: mem;
31+ use std:: path:: PathBuf ;
3132use std:: process;
3233
3334use check:: { self , TestKind } ;
@@ -1209,11 +1210,19 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
12091210 if paths. len ( ) == 0 && rule. default {
12101211 Some ( ( rule, 0 ) )
12111212 } else {
1212- paths. iter ( ) . position ( |path| path. ends_with ( rule. path ) )
1213+ paths. iter ( )
1214+ . position ( |path| path. ends_with ( rule. path ) )
12131215 . map ( |priority| ( rule, priority) )
12141216 }
12151217 } ) . collect ( ) ;
12161218
1219+ if rules. is_empty ( ) &&
1220+ !paths. get ( 0 ) . unwrap_or ( & PathBuf :: new ( ) )
1221+ . ends_with ( "nonexistent/path/to/trigger/cargo/metadata" ) {
1222+ println ! ( "\n Nothing to run...\n " ) ;
1223+ process:: exit ( 1 ) ;
1224+ }
1225+
12171226 rules. sort_by_key ( |& ( _, priority) | priority) ;
12181227
12191228 rules. into_iter ( ) . flat_map ( |( rule, _) | {
You can’t perform that action at this time.
0 commit comments