File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 28
28
29
29
use std:: collections:: { BTreeMap , HashSet , HashMap } ;
30
30
use std:: mem;
31
+ use std:: path:: PathBuf ;
31
32
use std:: process;
32
33
33
34
use check:: { self , TestKind } ;
@@ -1209,11 +1210,19 @@ invalid rule dependency graph detected, was a rule added and maybe typo'd?
1209
1210
if paths. len ( ) == 0 && rule. default {
1210
1211
Some ( ( rule, 0 ) )
1211
1212
} else {
1212
- paths. iter ( ) . position ( |path| path. ends_with ( rule. path ) )
1213
+ paths. iter ( )
1214
+ . position ( |path| path. ends_with ( rule. path ) )
1213
1215
. map ( |priority| ( rule, priority) )
1214
1216
}
1215
1217
} ) . collect ( ) ;
1216
1218
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
+
1217
1226
rules. sort_by_key ( |& ( _, priority) | priority) ;
1218
1227
1219
1228
rules. into_iter ( ) . flat_map ( |( rule, _) | {
You can’t perform that action at this time.
0 commit comments