Skip to content

Commit 51a1c17

Browse files
authored
docs: add explicit mention for capturing multiple .env files (#10061)
### Description A user mentioned that it was annoying to write out all the various iterations of their `.env` files explicitly. Making sure to mention that you can capture them all at once with a `*`.
1 parent 1a54eff commit 51a1c17

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

docs/repo-docs/crafting-your-repository/using-environment-variables.mdx

+16-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,22 @@ To do this, add the files to the [`inputs`](/repo/docs/reference/configuration#i
169169
"globalDependencies": [".env"], // All task hashes
170170
"tasks": {
171171
"build": {
172-
"inputs": ["$TURBO_DEFAULT$", ".env", ".env.local"] // Only the `build` task hash
172+
"inputs": ["$TURBO_DEFAULT$", ".env"] // Only the `build` task hash
173+
}
174+
}
175+
}
176+
```
177+
178+
### Multiple `.env` files
179+
180+
You can capture multiple `.env` files at once using a `*`.
181+
182+
```json title="./turbo.json"
183+
{
184+
"globalDependencies": [".env"], // All task hashes
185+
"tasks": {
186+
"build": {
187+
"inputs": ["$TURBO_DEFAULT$", ".env*"] // Only the `build` task hash
173188
}
174189
}
175190
}

0 commit comments

Comments
 (0)