File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ impl StepDescription {
217217 }
218218
219219 if !attempted_run {
220- eprintln ! ( "Warning : no rules matched {}." , path. display( ) ) ;
220+ panic ! ( "Error : no rules matched {}." , path. display( ) ) ;
221221 }
222222 }
223223 }
@@ -385,6 +385,12 @@ impl<'a> Builder<'a> {
385385 Subcommand :: Clean { .. } => panic ! ( ) ,
386386 } ;
387387
388+ if let Some ( path) = paths. get ( 0 ) {
389+ if path == Path :: new ( "nonexistent/path/to/trigger/cargo/metadata" ) {
390+ return ;
391+ }
392+ }
393+
388394 let builder = Builder {
389395 build,
390396 top_stage : build. config . stage . unwrap_or ( 2 ) ,
Original file line number Diff line number Diff line change @@ -278,9 +278,7 @@ Arguments:
278278 let src = matches. opt_str ( "src" ) . map ( PathBuf :: from)
279279 . or_else ( || env:: var_os ( "SRC" ) . map ( PathBuf :: from) )
280280 . 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 > > ( ) ;
284282
285283 let cfg_file = matches. opt_str ( "config" ) . map ( PathBuf :: from) . or_else ( || {
286284 if fs:: metadata ( "config.toml" ) . is_ok ( ) {
@@ -380,9 +378,7 @@ Arguments:
380378 cmd,
381379 incremental : matches. opt_present ( "incremental" ) ,
382380 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 < _ > > ( ) ,
386382 src,
387383 }
388384 }
You can’t perform that action at this time.
0 commit comments