mirror of
https://github.com/go-task/task.git
synced 2025-12-24 23:49:24 +01:00
chore(website): sync translations (#1145)
This commit is contained in:
@@ -17,10 +17,12 @@ task [--flags] [tasks...] [-- CLI_ARGS...]
|
||||
|
||||
:::tip
|
||||
|
||||
|
||||
If `--` is given, all remaning arguments will be assigned to a special `CLI_ARGS` variable
|
||||
|
||||
:::
|
||||
|
||||
|
||||
| Short | Flag | Type | Default | Description |
|
||||
| ----- | --------------------------- | -------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `-c` | `--color` | `bool` | `true` | Colored output. Enabled by default. Set flag to `false` or use `NO_COLOR=1` to disable. |
|
||||
@@ -76,9 +78,11 @@ A full list of the exit codes and their descriptions can be found below:
|
||||
These codes can also be found in the repository in [`errors/errors.go`](https://github.com/go-task/task/blob/main/errors/errors.go).
|
||||
|
||||
:::info
|
||||
|
||||
When Task is run with the `-x`/`--exit-code` flag, the exit code of any failed commands will be passed through to the user instead.
|
||||
:::
|
||||
|
||||
|
||||
## JSON Output
|
||||
|
||||
When using the `--json` flag in combination with either the `--list` or `--list-all` flags, the output will be a JSON object with the following structure:
|
||||
@@ -165,6 +169,7 @@ Some environment variables can be overriden to adjust Task behavior.
|
||||
|
||||
:::info
|
||||
|
||||
|
||||
Informing only a string like below is equivalent to setting that value to the `taskfile` attribute.
|
||||
|
||||
```yaml
|
||||
@@ -174,6 +179,7 @@ includes:
|
||||
|
||||
:::
|
||||
|
||||
|
||||
### Variable
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
@@ -183,6 +189,7 @@ includes:
|
||||
|
||||
:::info
|
||||
|
||||
|
||||
Static and dynamic variables have different syntaxes, like below:
|
||||
|
||||
```yaml
|
||||
@@ -194,6 +201,7 @@ vars:
|
||||
|
||||
:::
|
||||
|
||||
|
||||
### Task
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
@@ -225,6 +233,7 @@ vars:
|
||||
|
||||
:::info
|
||||
|
||||
|
||||
These alternative syntaxes are available. They will set the given values to `cmds` and everything else will be set to their default values:
|
||||
|
||||
```yaml
|
||||
@@ -241,6 +250,7 @@ tasks:
|
||||
|
||||
:::
|
||||
|
||||
|
||||
#### Command
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
@@ -257,6 +267,7 @@ tasks:
|
||||
|
||||
:::info
|
||||
|
||||
|
||||
If given as a a string, the value will be assigned to `cmd`:
|
||||
|
||||
```yaml
|
||||
@@ -269,6 +280,7 @@ tasks:
|
||||
|
||||
:::
|
||||
|
||||
|
||||
#### Dependency
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
@@ -278,6 +290,7 @@ tasks:
|
||||
|
||||
:::tip
|
||||
|
||||
|
||||
If you don't want to set additional variables, it's enough to declare the dependency as a list of strings (they will be assigned to `task`):
|
||||
|
||||
```yaml
|
||||
@@ -288,6 +301,7 @@ tasks:
|
||||
|
||||
:::
|
||||
|
||||
|
||||
#### Precondition
|
||||
|
||||
| Attribute | Type | Default | Description |
|
||||
@@ -297,6 +311,7 @@ tasks:
|
||||
|
||||
:::tip
|
||||
|
||||
|
||||
If you don't want to set a different message, you can declare a precondition like this and the value will be assigned to `sh`:
|
||||
|
||||
```yaml
|
||||
|
||||
Reference in New Issue
Block a user