You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Built-in test-with-args task seems not to work properly when passing options as arguments.
The same issue might occur in other built-in tasks which can take arguments.
Expected Behavior
cargo test --message-format=json should be executed as defined in rust.toml
To Reproduce
Run cargo make test-with-args -- --message-format=json.
Error Stack
[cargo-make] INFO - cargo make 0.32.6[cargo-make] INFO - Build File: Makefile.toml[cargo-make] INFO - Task: test-with-args[cargo-make] INFO - Profile: development[cargo-make] INFO - Running Task: workspaceerror: Found argument '--message-format' which wasn't expected, or isn't valid in this contextUSAGE: cargo make --allow-private --disable-check-for-updates --env <ENV>... --loglevel <LOG LEVEL> --no-on-error --profile <PROFILE>For more information try --help[cargo-make] ERROR - Error while executing command, exit code: 1[cargo-make] WARN - Build Failed.
Verbose Logs
$ cargo make -v test-with-args -- --message-format=json
[cargo-make] INFO - cargo make 0.32.6
[cargo-make] VERBOSE - Written By Sagie Gur-Ari <sagiegurari@gmail.com>
[cargo-make] VERBOSE - Cli Args CliArgs {
command: "cargo make",
build_file: None,
task: "test-with-args",
profile: Some(
"development",
),
log_level: "verbose",
disable_color: false,
cwd: None,
env: None,
env_file: None,
disable_workspace: false,
disable_on_error: false,
allow_private: false,
skip_init_end_tasks: false,
print_only: false,
list_all_steps: false,
diff_execution_plan: false,
disable_check_for_updates: false,
experimental: false,
arguments: Some(
[
"--message-format=json",
],
),
output_format: "default",
output_file: None,
print_time_summary: false,
}
...
+ cargo make --disable-check-for-updates --allow-private --no-on-error --loglevel=verbose --env CARGO_MAKE_CRATE_CURRENT_WORKSPACE_MEMBER=benches --profile development test-with-args --message-format=json
error: Found argument '--message-format' which wasn't expected, or isn't valid in this context
Maybe, -- must be inserted between test-with-args and --message-format=json when running a command internally. -- in the original command is not contained in CliArgs::arguments because it's removed by clap.
The text was updated successfully, but these errors were encountered:
Describe The Bug
Built-in
test-with-args
task seems not to work properly when passing options as arguments.The same issue might occur in other built-in tasks which can take arguments.
Expected Behavior
cargo test --message-format=json
should be executed as defined in rust.tomlTo Reproduce
Run
cargo make test-with-args -- --message-format=json
.Error Stack
Verbose Logs
Maybe,
--
must be inserted betweentest-with-args
and--message-format=json
when running a command internally.--
in the original command is not contained inCliArgs::arguments
because it's removed byclap
.The text was updated successfully, but these errors were encountered: