diff --git a/internal/compiler/compiler.go b/internal/compiler/compiler.go index 649f0ff7..85bf4809 100644 --- a/internal/compiler/compiler.go +++ b/internal/compiler/compiler.go @@ -5,6 +5,7 @@ import ( "context" "encoding/json" "fmt" + "os" "path/filepath" "strings" "sync" @@ -196,6 +197,7 @@ func (c *Compiler) ResetCache() { func (c *Compiler) getSpecialVars(t *ast.Task) (map[string]string, error) { return map[string]string{ "TASK": t.Task, + "TASK_EXE": filepath.ToSlash(os.Args[0]), "ROOT_TASKFILE": filepathext.SmartJoin(c.Dir, c.Entrypoint), "ROOT_DIR": c.Dir, "TASKFILE": t.Location.Taskfile,