mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
chore: make sources paths relative
This commit is contained in:
committed by
Andrey Nering
parent
6be3ff6141
commit
d447cc3f19
@@ -2,6 +2,7 @@ package task
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/joho/godotenv"
|
"github.com/joho/godotenv"
|
||||||
@@ -136,6 +137,12 @@ func (e *Executor) compiledTask(call taskfile.Call, evaluateShVars bool) (*taskf
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
// Make the paths relative to the task dir
|
||||||
|
for i, v := range list {
|
||||||
|
if list[i], err = filepath.Rel(new.Dir, v); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Get the list from a variable and split it up
|
// Get the list from a variable and split it up
|
||||||
if cmd.For.Var != "" {
|
if cmd.For.Var != "" {
|
||||||
|
Reference in New Issue
Block a user