Skip to content

Commit

Permalink
feat: CLI_FORCE special variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pd93 committed Dec 21, 2023
1 parent 7c93741 commit e90a49e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/task/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,14 @@ func run() error {
calls = append(calls, taskfile.Call{Task: "default", Direct: true})
}

var cliForceValue bool
if flags.force || flags.forceAll {
cliForceValue = true
} else {
cliForceValue = false
}
globals.Set("CLI_ARGS", taskfile.Var{Value: cliArgs})
globals.Set("CLI_FORCE", taskfile.Var{Value: cliForceValue})
e.Taskfile.Vars.Merge(globals)

if !flags.watch {
Expand Down

0 comments on commit e90a49e

Please sign in to comment.