1
0
mirror of https://github.com/go-task/task.git synced 2025-07-15 01:35:00 +02:00

fix: don't suggest internal tasks (#2323)

Co-authored-by: Max Mizikar <maxmzkr@gmail.com>
This commit is contained in:
Max Mizikar
2025-07-09 13:36:40 -04:00
committed by GitHub
parent 64fb66895b
commit fe2da74ea3
5 changed files with 19 additions and 0 deletions

View File

@ -957,6 +957,15 @@ func TestFuzzyModel(t *testing.T) {
),
WithTask("install"),
)
NewExecutorTest(t,
WithName("intern"),
WithExecutorOptions(
task.WithDir("testdata/fuzzy"),
),
WithTask("intern"),
WithRunError(),
)
}
func TestIncludeChecksum(t *testing.T) {

View File

@ -104,6 +104,9 @@ func (e *Executor) setupFuzzyModel() {
var words []string
for name, task := range e.Taskfile.Tasks.All(nil) {
if task.Internal {
continue
}
words = append(words, name)
words = slices.Concat(words, task.Aliases)
}

View File

@ -2,3 +2,8 @@ version: 3
tasks:
install: echo 'install'
internal:
internal: true
cmds:
- echo "internal"

View File

@ -0,0 +1 @@
task: Task "intern" does not exist

View File

@ -0,0 +1 @@
task: No tasks with description available. Try --list-all to list all tasks