mirror of
https://github.com/go-task/task.git
synced 2026-06-26 14:16:16 +00:00
Refactor: Add SmartJoin to handle IsAbs automatically
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/go-task/task/v3/internal/execext"
|
||||
"github.com/go-task/task/v3/internal/filepathext"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
@@ -133,7 +134,7 @@ func (it *IncludedTaskfile) resolvePath(path string) (string, error) {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
result, err := filepath.Abs(filepath.Join(it.BaseDir, path))
|
||||
result, err := filepath.Abs(filepathext.SmartJoin(it.BaseDir, path))
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("task: error resolving path %s relative to %s: %w", path, it.BaseDir, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user