From a927ffb31e29c1ad4550e5764528a2bc1d8bc58b Mon Sep 17 00:00:00 2001 From: Samuel Krieg Date: Sat, 15 Nov 2025 17:53:10 +0100 Subject: [PATCH] docs: add tasks.task.dir (#2489) --- website/src/docs/reference/schema.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/src/docs/reference/schema.md b/website/src/docs/reference/schema.md index 87d4002f..f28b2998 100644 --- a/website/src/docs/reference/schema.md +++ b/website/src/docs/reference/schema.md @@ -614,6 +614,21 @@ tasks: - ./deploy.sh ``` +### `dir` + +- **Type**: `string` +- **Description**: The directory in which this task should run +- **Default**: If the task is in the root Taskfile, the default `dir` is + `ROOT_DIR`. For included Taskfiles, the default `dir` is the value specified in + their respective `includes.*.dir` field (if any). + +```yaml +tasks: + current-dir: + dir: '{{.USER_WORKING_DIR}}' + cmd: pwd +``` + #### `requires` - **Type**: `Requires`