feat: add TASK_OFFLINE env and expose it as a special variable (#1716)

Co-authored-by: Pete Davison <pd93.uk@outlook.com>
This commit is contained in:
Valentin Maerten
2024-09-21 11:17:15 -04:00
committed by GitHub
parent 96a690ac2f
commit ddccd1bb61
4 changed files with 16 additions and 8 deletions

View File

@@ -198,6 +198,7 @@ func run() error {
globals.Set("CLI_FORCE", ast.Var{Value: flags.Force || flags.ForceAll})
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})
e.Taskfile.Vars.Merge(globals, nil)
if !flags.Watch {