Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING(cli/test): require equals for test jobs flag #15225

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1556,6 +1556,7 @@ fn test_subcommand<'a>() -> Command<'a> {
.min_values(0)
.max_values(1)
.takes_value(true)
.require_equals(true)
.validator(|val: &str| match val.parse::<NonZeroUsize>() {
Ok(_) => Ok(()),
Err(_) => Err("jobs should be a non zero unsigned integer".to_string()),
Expand Down Expand Up @@ -2669,6 +2670,10 @@ fn test_parse(flags: &mut Flags, matches: &clap::ArgMatches) {

let concurrent_jobs = if matches.is_present("jobs") {
if let Some(value) = matches.value_of("jobs") {
println!(
"{}",
crate::colors::yellow("Warning: --jobs flag with numeric value is deprecated. Use 'DENO_JOBS' environment variable with --jobs flag instead."),
);
value.parse().unwrap()
} else if let Ok(value) = env::var("DENO_JOBS") {
value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Warning: --jobs flag with numeric value is deprecated. Use 'DENO_JOBS' environment variable with --jobs flag instead.
Check [WILDCARD]/test/short-pass.ts
running 1 test from ./test/short-pass.ts
test ... ok ([WILDCARD])
Expand Down