Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions taskfile/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package taskfile
import (
"context"
"fmt"
"net/url"
"os"
"strings"
"time"

"gopkg.in/yaml.v3"
Expand Down Expand Up @@ -76,6 +78,17 @@ func Read(
return err
}

//If we include a taskfile in a remote taskfile, then this taskfile is also remote
if node.Remote() {
nodeUrl, err := url.Parse(node.Location())
if err != nil {
return err
}
split := strings.Split(nodeUrl.Path, "/")
split[len(split)-1] = include.Taskfile
nodeUrl.Path = strings.Join(split, "/")
include.Taskfile = nodeUrl.String()
}
uri, err := include.FullTaskfilePath()
if err != nil {
return err
Expand Down