Skip to content

Commit c4766e2

Browse files
pd93andreynering
andauthored
fix: add missing nil check (#971)
Co-authored-by: Andrey Nering <[email protected]>
1 parent 796097e commit c4766e2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Small bug fix: closing "Taskfile.yml" once we're done reading it
66
([#963](https://github.com/go-task/task/issues/963), [#964](https://github.com/go-task/task/pull/964) by @HeCorr).
7+
- Fixes a bug in v2 that caused a panic when using a `Taskfile_{{OS}}.yml` file
8+
([#961](https://github.com/go-task/task/issues/961), [#971](https://github.com/go-task/task/pull/971) by @pd93).
79
- Fixed a bug where watch intervals set in the Taskfile were not being respected ([#969](https://github.com/go-task/task/pull/969), [#970](https://github.com/go-task/task/pull/970) by @pd93)
810
- Add `--json` flag (alias `-j`) with the intent to improve support for code
911
editors and add room to other possible integrations. This is basic for now,

taskfile/merge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func Merge(t1, t2 *Taskfile, includedTaskfile *IncludedTaskfile, namespaces ...s
4545

4646
// Set the task to internal if EITHER the included task or the included
4747
// taskfile are marked as internal
48-
task.Internal = task.Internal || includedTaskfile.Internal
48+
task.Internal = task.Internal || (includedTaskfile != nil && includedTaskfile.Internal)
4949

5050
// Add namespaces to dependencies, commands and aliases
5151
for _, dep := range task.Deps {

0 commit comments

Comments
 (0)