mirror of
https://github.com/go-task/task.git
synced 2025-02-21 19:48:29 +02:00
Append task prefix to log messages
This commit is contained in:
parent
15e831c0b0
commit
6e5f8b1fb0
@ -182,10 +182,10 @@ func exists(path string) (string, error) {
|
|||||||
|
|
||||||
func checkCircularIncludes(node *ReaderNode) error {
|
func checkCircularIncludes(node *ReaderNode) error {
|
||||||
if node == nil {
|
if node == nil {
|
||||||
return errors.New("failed to check for include cycle: node was nil")
|
return errors.New("task: failed to check for include cycle: node was nil")
|
||||||
}
|
}
|
||||||
if node.Parent == nil {
|
if node.Parent == nil {
|
||||||
return errors.New("failed to check for include cycle: node.Parent was nil")
|
return errors.New("task: failed to check for include cycle: node.Parent was nil")
|
||||||
}
|
}
|
||||||
var curNode = node
|
var curNode = node
|
||||||
var basePath = filepath.Join(node.Dir, node.Entrypoint)
|
var basePath = filepath.Join(node.Dir, node.Entrypoint)
|
||||||
@ -193,7 +193,7 @@ func checkCircularIncludes(node *ReaderNode) error {
|
|||||||
curNode = curNode.Parent
|
curNode = curNode.Parent
|
||||||
curPath := filepath.Join(curNode.Dir, curNode.Entrypoint)
|
curPath := filepath.Join(curNode.Dir, curNode.Entrypoint)
|
||||||
if curPath == basePath {
|
if curPath == basePath {
|
||||||
return fmt.Errorf("include cycle detected between %s <--> %s",
|
return fmt.Errorf("task: include cycle detected between %s <--> %s",
|
||||||
curPath,
|
curPath,
|
||||||
filepath.Join(node.Parent.Dir, node.Parent.Entrypoint),
|
filepath.Join(node.Parent.Dir, node.Parent.Entrypoint),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user