Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions website/src/docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,19 @@ tasks:
- echo "Using $KEYNAME and endpoint $ENDPOINT"
```

When the same variable is defined in multiple dotenv files, the **first file in
the list takes precedence**. This allows you to set up override patterns by
placing higher-priority files first:

```yaml
version: '3'

dotenv:
- .env.local # Highest priority - local developer overrides
- .env.{{.ENV}} # Environment-specific settings
- .env # Base defaults (lowest priority)
```

Dotenv files can also be specified at the task level:

```yaml
Expand Down
8 changes: 5 additions & 3 deletions website/src/docs/reference/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,14 @@ silent: true
### `dotenv`

- **Type**: `[]string`
- **Description**: Load environment variables from .env files
- **Description**: Load environment variables from .env files. When the same
variable is defined in multiple files, the first file in the list takes
precedence.

```yaml
dotenv:
- .env
- .env.local
- .env.local # Highest priority
- .env # Lowest priority
```

### `run`
Expand Down
Loading