-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(task): properly handle task name wildcards with --recursive (#27396)
This commit fixes `deno task` by checking if the provided task name actually has a wildcard char ("*"). Previously, if the "--recursive" flag was passed, the task name was treated as a regex, which lead to a situation where exact task name resulted in a regex that matched all tasks with the specific prefix. This commit fixes it, by checking if the provided task name, is an exact name, or is it a wildcard match. Closes #27370 Closes #27401 Closes #27408
- Loading branch information
1 parent
9d7174e
commit 14e4064
Showing
5 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"tempDir": true, | ||
"tests": { | ||
// Regression test for https://github.com/denoland/deno/issues/27370 | ||
"root": { | ||
"args": "task test-all", | ||
"output": "root.out", | ||
"exitCode": 0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"workspace": ["./subdir"], | ||
"tasks": { | ||
"test-all": "deno task --recursive test" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Task test-all deno task --recursive test | ||
Task test echo 'ok' | ||
ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"tasks": { | ||
"test": "echo 'ok'" | ||
} | ||
} |