File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -419,15 +419,19 @@ fn cmd_build(
419419 let multiple = matches. get_flag ( "multiple" ) ;
420420
421421 if builds. len ( ) > 1 && !multiple {
422- debug ! ( "laze: multiple task targets found:" ) ;
423- for build_info in builds {
424- debug ! ( "{} {}" , build_info. builder, build_info. binary) ;
425- }
426-
427- // TODO: allow running tasks for multiple targets
428- return Err ( anyhow ! (
429- "please specify one of these builders, or -m/--multiple-tasks."
422+ if log_enabled ! ( Debug ) {
423+ debug ! ( "laze: multiple task targets found:" ) ;
424+ for build_info in builds {
425+ debug ! ( "{} {}" , build_info. builder, build_info. binary) ;
426+ }
427+ return Err ( anyhow ! (
428+ "please specify only one builder, or add `-m`/`--multiple-tasks`."
429+ ) ) ;
430+ } else {
431+ return Err ( anyhow ! (
432+ "multiple task targets found. Choose one (use `--verbose` to see options), or add `-m`/`--multiple-tasks`."
430433 ) ) ;
434+ }
431435 }
432436
433437 let task_name = task;
You can’t perform that action at this time.
0 commit comments