mirror of
https://github.com/go-task/task.git
synced 2026-07-09 06:55:14 +00:00
feat: Add temp dir option (#2891)
Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
This commit is contained in:
@@ -220,6 +220,18 @@ Run the global Taskfile from `$HOME/Taskfile.{yml,yaml}`.
|
||||
task backup --global
|
||||
```
|
||||
|
||||
#### `--temp-dir <path>`
|
||||
|
||||
Set the directory used to store Task temporary files, such as checksums.
|
||||
Relative paths are relative to the root Taskfile.
|
||||
|
||||
- **Config equivalent**: [`temp-dir`](./config.md#temp-dir)
|
||||
- **Environment variable**: [`TASK_TEMP_DIR`](./environment.md#task-temp-dir)
|
||||
|
||||
```bash
|
||||
task build --temp-dir .task-cache
|
||||
```
|
||||
|
||||
### Output Control
|
||||
|
||||
#### `-o, --output <mode>`
|
||||
|
||||
@@ -166,6 +166,18 @@ failfast: true
|
||||
interactive: true
|
||||
```
|
||||
|
||||
### `temp-dir`
|
||||
|
||||
- **Type**: `string`
|
||||
- **Default**: `./.task`
|
||||
- **Description**: Directory to store Task temporary files, such as checksums
|
||||
and temporary metadata. Relative paths are relative to the root Taskfile.
|
||||
- **Environment variable**: [`TASK_TEMP_DIR`](./environment.md#task-temp-dir)
|
||||
|
||||
```yaml
|
||||
temp-dir: .task
|
||||
```
|
||||
|
||||
## Example Configuration
|
||||
|
||||
Here's a complete example of a `.taskrc.yml` file with all available options:
|
||||
@@ -177,6 +189,7 @@ silent: false
|
||||
color: true
|
||||
disable-fuzzy: false
|
||||
concurrency: 2
|
||||
temp-dir: .task
|
||||
|
||||
# Enable experimental features
|
||||
experiments:
|
||||
|
||||
@@ -88,6 +88,10 @@
|
||||
"description": "Prompt for missing required variables instead of failing. Requires a TTY.",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"temp-dir": {
|
||||
"type": "string",
|
||||
"description": "Directory to store Task temporary files, such as checksums and temporary metadata. Relative paths are relative to the root Taskfile."
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
||||
Reference in New Issue
Block a user