mirror of
https://github.com/go-task/task.git
synced 2026-06-23 20:55:52 +00:00
feat(config): add environment variable support for all taskrc options (#2607)
This commit is contained in:
@@ -10,8 +10,8 @@ outline: deep
|
||||
Task has multiple ways of being configured. These methods are parsed, in
|
||||
sequence, in the following order with the highest priority last:
|
||||
|
||||
- [Environment variables](./environment.md)
|
||||
- [Configuration files](./config.md)
|
||||
- [Environment variables](./environment.md)
|
||||
- _Command-line flags_
|
||||
|
||||
In this document, we will look at the last of the three options, command-line
|
||||
@@ -104,6 +104,9 @@ task --version
|
||||
|
||||
Enable verbose mode for detailed output.
|
||||
|
||||
- **Config equivalent**: [`verbose`](./config.md#verbose)
|
||||
- **Environment variable**: [`TASK_VERBOSE`](./environment.md#task-verbose)
|
||||
|
||||
```bash
|
||||
task build --verbose
|
||||
```
|
||||
@@ -112,6 +115,9 @@ task build --verbose
|
||||
|
||||
Disable command echoing.
|
||||
|
||||
- **Config equivalent**: [`silent`](./config.md#silent)
|
||||
- **Environment variable**: [`TASK_SILENT`](./environment.md#task-silent)
|
||||
|
||||
```bash
|
||||
task deploy --silent
|
||||
```
|
||||
@@ -121,6 +127,9 @@ task deploy --silent
|
||||
Disable fuzzy matching for task names. When enabled, Task will not suggest
|
||||
similar task names when you mistype a task name.
|
||||
|
||||
- **Config equivalent**: [`disable-fuzzy`](./config.md#disable-fuzzy)
|
||||
- **Environment variable**: [`TASK_DISABLE_FUZZY`](./environment.md#task-disable-fuzzy)
|
||||
|
||||
```bash
|
||||
task buidl --disable-fuzzy
|
||||
# Output: Task "buidl" does not exist
|
||||
@@ -133,6 +142,9 @@ task buidl --disable-fuzzy
|
||||
|
||||
Stop executing dependencies as soon as one of them fails.
|
||||
|
||||
- **Config equivalent**: [`failfast`](./config.md#failfast)
|
||||
- **Environment variable**: [`TASK_FAILFAST`](./environment.md#task-failfast)
|
||||
|
||||
```bash
|
||||
task build --failfast
|
||||
```
|
||||
@@ -149,6 +161,8 @@ task build --force
|
||||
|
||||
Compile and print tasks without executing them.
|
||||
|
||||
- **Environment variable**: [`TASK_DRY`](./environment.md#task-dry)
|
||||
|
||||
```bash
|
||||
task deploy --dry
|
||||
```
|
||||
@@ -165,6 +179,9 @@ task test lint --parallel
|
||||
|
||||
Limit the number of concurrent tasks. Zero means unlimited.
|
||||
|
||||
- **Config equivalent**: [`concurrency`](./config.md#concurrency)
|
||||
- **Environment variable**: [`TASK_CONCURRENCY`](./environment.md#task-concurrency)
|
||||
|
||||
```bash
|
||||
task test --concurrency 4
|
||||
```
|
||||
@@ -241,6 +258,9 @@ task test --output group --output-group-error-only
|
||||
|
||||
Control colored output. Enabled by default.
|
||||
|
||||
- **Config equivalent**: [`color`](./config.md#color)
|
||||
- **Environment variable**: [`TASK_COLOR`](./environment.md#task-color)
|
||||
|
||||
```bash
|
||||
task build --color=false
|
||||
# or use environment variable
|
||||
@@ -311,6 +331,8 @@ task build --watch --interval 1s
|
||||
|
||||
Automatically answer "yes" to all prompts.
|
||||
|
||||
- **Environment variable**: [`TASK_ASSUME_YES`](./environment.md#task-assume-yes)
|
||||
|
||||
```bash
|
||||
task deploy --yes
|
||||
```
|
||||
@@ -324,6 +346,8 @@ Task automatically detects non-TTY environments (like CI pipelines) and skips
|
||||
prompts. This flag can also be set in `.taskrc.yml` to enable prompts by
|
||||
default.
|
||||
|
||||
- **Environment variable**: [`TASK_INTERACTIVE`](./environment.md#task-interactive)
|
||||
|
||||
```bash
|
||||
task deploy --interactive
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user