File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -242,11 +242,15 @@ fn expand_aliases(
242
242
( Some ( _) , None ) => {
243
243
// Command is built-in and is not conflicting with alias, but contains ignored values.
244
244
if let Some ( mut values) = args. get_many :: < String > ( "" ) {
245
- config. shell ( ) . warn ( format ! (
246
- "trailing arguments after built-in command `{}` are ignored: `{}`" ,
245
+ return Err ( anyhow:: format_err!(
246
+ "\
247
+ trailing arguments after built-in command `{}` are unsupported: `{}`
248
+
249
+ To pass the arguments to the subcommand, remove `--`" ,
247
250
cmd,
248
251
values. join( " " ) ,
249
- ) ) ?;
252
+ )
253
+ . into ( ) ) ;
250
254
}
251
255
}
252
256
( None , None ) => { }
Original file line number Diff line number Diff line change @@ -324,11 +324,12 @@ fn weird_check() {
324
324
. build ( ) ;
325
325
326
326
p. cargo ( "-- check --invalid_argument -some-other-argument" )
327
+ . with_status ( 101 )
327
328
. with_stderr (
328
329
"\
329
- [WARNING ] trailing arguments after built-in command `check` are ignored : `--invalid_argument -some-other-argument`
330
- [CHECKING] foo v0.5.0 ([..])
331
- [FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
330
+ [ERROR ] trailing arguments after built-in command `check` are unsupported : `--invalid_argument -some-other-argument`
331
+
332
+ To pass the arguments to the subcommand, remove `--`
332
333
" ,
333
334
)
334
335
. run ( ) ;
You can’t perform that action at this time.
0 commit comments