go-task / task

A task runner / simpler Make alternative written in Go
https://taskfile.dev
MIT License
11.01k stars 584 forks source link

can't disable color in taskfile.yml #1589

Open taylormonacelli opened 5 months ago

taylormonacelli commented 5 months ago

I'd like to instruct task to not use colored output within the Taskfile if possible.

This doesn't work:

cat >Taskfile.yml <<EOF
version: "3"
vars:
  NO_COLOR: 1
env:
  NO_COLOR: 1
tasks:
  default:
    env:
      NO_COLOR: 1
    cmds:
    - echo foo
EOF
task 

These work fine:

NO_COLOR=1 task
task --color=false

Not sure if i'm getting syntax wrong or its not supported.

vmaerten commented 2 months ago

Hi @taylormonacelli,

It is not supported at the moment. The only way to do it is by setting the env variable or with the CLI flags