diff --git a/CHANGELOG.md b/CHANGELOG.md index e745a546..7e060be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Fixed a bug where tasks were sometimes incorrectly marked as internal ([#1007](https://github.com/go-task/task/pull/1007) by @pd93). + ## v3.20.0 - 2023-01-14 - Improve behavior and performance of status checking when using the diff --git a/taskfile/included_taskfile.go b/taskfile/included_taskfile.go index ef4ca06b..15653a3b 100644 --- a/taskfile/included_taskfile.go +++ b/taskfile/included_taskfile.go @@ -61,14 +61,6 @@ func (tfs *IncludedTaskfiles) Len() int { return len(tfs.Keys) } -// Merge merges the given IncludedTaskfiles into the caller one -func (tfs *IncludedTaskfiles) Merge(other *IncludedTaskfiles) { - _ = other.Range(func(key string, value IncludedTaskfile) error { - tfs.Set(key, value) - return nil - }) -} - // Set sets a value to a given key func (tfs *IncludedTaskfiles) Set(key string, includedTaskfile IncludedTaskfile) { if tfs.Mapping == nil { diff --git a/taskfile/merge.go b/taskfile/merge.go index acf56bcc..6c805ea9 100644 --- a/taskfile/merge.go +++ b/taskfile/merge.go @@ -5,7 +5,7 @@ import ( "strings" ) -// NamespaceSeparator contains the character that separates namescapes +// NamespaceSeparator contains the character that separates namespaces const NamespaceSeparator = ":" // Merge merges the second Taskfile into the first @@ -21,11 +21,6 @@ func Merge(t1, t2 *Taskfile, includedTaskfile *IncludedTaskfile, namespaces ...s t1.Output = t2.Output } - if t1.Includes == nil { - t1.Includes = &IncludedTaskfiles{} - } - t1.Includes.Merge(t2.Includes) - if t1.Vars == nil { t1.Vars = &Vars{} }