Skip to content

Commit

Permalink
feat: task executable variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 committed Apr 26, 2024
1 parent ddd9964 commit 9c4b095
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
"sync"
Expand Down Expand Up @@ -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": os.Args[0],
"ROOT_TASKFILE": filepathext.SmartJoin(c.Dir, c.Entrypoint),
"ROOT_DIR": c.Dir,
"TASKFILE": t.Location.Taskfile,
Expand Down

0 comments on commit 9c4b095

Please sign in to comment.