mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
fix(task): --recursive
option not working (#27183)
We didn't handle the `--recursive` option properly in `deno task`. This PR addresses that. Fixes https://github.com/denoland/deno/issues/27174
This commit is contained in:
parent
65d01262f0
commit
5e809f9720
15 changed files with 99 additions and 7 deletions
|
@ -88,6 +88,7 @@ pub async fn execute_script(
|
|||
&package_regex,
|
||||
filter,
|
||||
force_use_pkg_json,
|
||||
task_flags.recursive,
|
||||
)?;
|
||||
|
||||
return Ok(0);
|
||||
|
@ -97,7 +98,9 @@ pub async fn execute_script(
|
|||
let mut packages_task_info: Vec<PackageTaskInfo> = vec![];
|
||||
|
||||
for folder in workspace.config_folders() {
|
||||
if !matches_package(folder.1, force_use_pkg_json, &package_regex) {
|
||||
if !task_flags.recursive
|
||||
&& !matches_package(folder.1, force_use_pkg_json, &package_regex)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -700,12 +703,15 @@ fn print_available_tasks_workspace(
|
|||
package_regex: &Regex,
|
||||
filter: &str,
|
||||
force_use_pkg_json: bool,
|
||||
recursive: bool,
|
||||
) -> Result<(), AnyError> {
|
||||
let workspace = cli_options.workspace();
|
||||
|
||||
let mut matched = false;
|
||||
for folder in workspace.config_folders() {
|
||||
if !matches_package(folder.1, force_use_pkg_json, package_regex) {
|
||||
if !recursive
|
||||
&& !matches_package(folder.1, force_use_pkg_json, package_regex)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
matched = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue