File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ impl StepDescription {
217
217
}
218
218
219
219
if !attempted_run {
220
- eprintln ! ( "Warning : no rules matched {}." , path. display( ) ) ;
220
+ panic ! ( "Error : no rules matched {}." , path. display( ) ) ;
221
221
}
222
222
}
223
223
}
@@ -385,6 +385,12 @@ impl<'a> Builder<'a> {
385
385
Subcommand :: Clean { .. } => panic ! ( ) ,
386
386
} ;
387
387
388
+ if let Some ( path) = paths. get ( 0 ) {
389
+ if path == Path :: new ( "nonexistent/path/to/trigger/cargo/metadata" ) {
390
+ return ;
391
+ }
392
+ }
393
+
388
394
let builder = Builder {
389
395
build,
390
396
top_stage : build. config . stage . unwrap_or ( 2 ) ,
Original file line number Diff line number Diff line change @@ -278,9 +278,7 @@ Arguments:
278
278
let src = matches. opt_str ( "src" ) . map ( PathBuf :: from)
279
279
. or_else ( || env:: var_os ( "SRC" ) . map ( PathBuf :: from) )
280
280
. unwrap_or ( cwd. clone ( ) ) ;
281
- let paths = matches. free [ 1 ..] . iter ( ) . map ( |p| {
282
- cwd. join ( p) . strip_prefix ( & src) . expect ( "paths passed to be inside checkout" ) . into ( )
283
- } ) . collect :: < Vec < PathBuf > > ( ) ;
281
+ let paths = matches. free [ 1 ..] . iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < PathBuf > > ( ) ;
284
282
285
283
let cfg_file = matches. opt_str ( "config" ) . map ( PathBuf :: from) . or_else ( || {
286
284
if fs:: metadata ( "config.toml" ) . is_ok ( ) {
@@ -380,9 +378,7 @@ Arguments:
380
378
cmd,
381
379
incremental : matches. opt_present ( "incremental" ) ,
382
380
exclude : split ( matches. opt_strs ( "exclude" ) )
383
- . into_iter ( ) . map ( |p| {
384
- cwd. join ( p) . strip_prefix ( & src) . expect ( "paths to be inside checkout" ) . into ( )
385
- } ) . collect :: < Vec < _ > > ( ) ,
381
+ . into_iter ( ) . map ( |p| p. into ( ) ) . collect :: < Vec < _ > > ( ) ,
386
382
src,
387
383
}
388
384
}
You can’t perform that action at this time.
0 commit comments