Skip to content

Commit

Permalink
feat: task executable variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 authored and andreynering committed May 16, 2024
1 parent ddd9964 commit fefb0b8
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": filepath.ToSlash(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 fefb0b8

Please sign in to comment.