Skip to content

Commit f05f7ea

Browse files
committed
docs: env option
1 parent 52e4313 commit f05f7ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/guide/intro/extensions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ This option can be given a filepath, an object with options, or an array of obje
7575

7676
`select` allows extending a property from the other file, and `optional` allows missing files.
7777

78+
To read another file with a different environment, simply use the `env` option:
79+
80+
```yaml
81+
$extends:
82+
path: ./other-file.yml
83+
env: staging
84+
```
85+
86+
This will load the file as if you were in `staging`, even though the current environment might be something else.
87+
7888
## The `$override` Directive
7989

8090
The override directive is exactly the same as `$extends`, except that the other file takes precedent when merging.

0 commit comments

Comments
 (0)