diff --git a/cmd/task/task.go b/cmd/task/task.go index 4ec8e39a..766eac56 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -182,6 +182,7 @@ func run() error { globals.Set("CLI_SILENT", ast.Var{Value: flags.Silent}) globals.Set("CLI_VERBOSE", ast.Var{Value: flags.Verbose}) globals.Set("CLI_OFFLINE", ast.Var{Value: flags.Offline}) + globals.Set("CLI_ASSUME_YES", ast.Var{Value: flags.AssumeYes}) e.Taskfile.Vars.ReverseMerge(globals, nil) if !flags.Watch { e.InterceptInterruptSignals() diff --git a/website/src/docs/reference/templating.md b/website/src/docs/reference/templating.md index 445e303f..c08fc007 100644 --- a/website/src/docs/reference/templating.md +++ b/website/src/docs/reference/templating.md @@ -172,6 +172,11 @@ tasks: - **Type**: `bool` - **Description**: Whether `--offline` flag was set +#### `CLI_ASSUME_YES` + +- **Type**: `bool` +- **Description**: Whether `--yes` flag was set + ### Task #### `TASK`