mirror of
https://github.com/go-task/task.git
synced 2025-07-15 01:35:00 +02:00
Add CHANGELOG + Small nits for #552
This commit is contained in:
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Add ability to declare an included Taskfile as optional
|
||||||
|
([#519](https://github.com/go-task/task/issues/519), [#552](https://github.com/go-task/task/pull/552)).
|
||||||
- Add support for including Taskfiles in the home directory by using `~`
|
- Add support for including Taskfiles in the home directory by using `~`
|
||||||
([#539](https://github.com/go-task/task/issues/539), [#557](https://github.com/go-task/task/pull/557)).
|
([#539](https://github.com/go-task/task/issues/539), [#557](https://github.com/go-task/task/pull/557)).
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@ includes:
|
|||||||
tests:
|
tests:
|
||||||
taskfile: ./tests/Taskfile.yml
|
taskfile: ./tests/Taskfile.yml
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
greet:
|
greet:
|
||||||
cmds:
|
cmds:
|
||||||
|
@ -60,10 +60,10 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
info, err := os.Stat(path)
|
info, err := os.Stat(path)
|
||||||
if err != nil && includedTask.Optional {
|
if err != nil {
|
||||||
|
if includedTask.Optional {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
|
Reference in New Issue
Block a user