Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions executor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions testdata/fuzzy/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@ version: 3

tasks:
install: echo 'install'

internal:
internal: true
cmds:
- echo "internal"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
task: Task "intern" does not exist
1 change: 1 addition & 0 deletions testdata/fuzzy/testdata/TestFuzzyModel-intern.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
task: No tasks with description available. Try --list-all to list all tasks
Loading