mirror of
https://github.com/go-task/task.git
synced 2024-12-12 10:45:49 +02:00
docs: describe how to use the silent flag for dependencies (#680)
This commit is contained in:
parent
8bc98fedbf
commit
e01b5565a2
@ -280,6 +280,7 @@ tasks:
|
||||
| --------- | ---------------------------------- | ------- | -------------------------------------------------------- |
|
||||
| `task` | `string` | | The task to be execute as a dependency. |
|
||||
| `vars` | [`map[string]Variable`](#variable) | | Optional additional variables to be passed to this task. |
|
||||
| `silent` | `bool` | `false` | Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`. |
|
||||
|
||||
:::tip
|
||||
|
||||
|
@ -468,6 +468,7 @@ tasks:
|
||||
vars: { TEXT: 'before 1' }
|
||||
- task: echo_sth
|
||||
vars: { TEXT: 'before 2' }
|
||||
silent: true
|
||||
cmds:
|
||||
- echo "after"
|
||||
|
||||
@ -574,8 +575,8 @@ tasks:
|
||||
- echo "Another task"
|
||||
```
|
||||
|
||||
Overriding variables in the called task is as simple as informing `vars`
|
||||
attribute:
|
||||
Using the `vars` and `silent` attributes you can choose to pass variables and
|
||||
toggle [silent mode](#silent-mode) on a call-by-call basis:
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
@ -591,6 +592,7 @@ tasks:
|
||||
cmds:
|
||||
- task: greet
|
||||
vars: { RECIPIENT: 'Cruel World' }
|
||||
silent: true
|
||||
```
|
||||
|
||||
The above syntax is also supported in `deps`.
|
||||
|
4
docs/static/schema.json
vendored
4
docs/static/schema.json
vendored
@ -241,6 +241,10 @@
|
||||
"vars": {
|
||||
"description": "Values passed to the task called",
|
||||
"$ref": "#/definitions/3/vars"
|
||||
},
|
||||
"silent": {
|
||||
"description": "Hides task name and command from output. The command's output will still be redirected to `STDOUT` and `STDERR`.",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user