Skip to content

Commit 01f7496

Browse files
authored
Merge pull request #2254 from FabianKramm/main
docs: improve env var documentation
2 parents ae29e45 + 8d7c952 commit 01f7496

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/pages/configuration/variables.mdx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,15 @@ If you want to overwrite a static variable, you can use the `--var MY_VAR=new-va
4747

4848

4949
### From Env Vars
50-
To load variables from the user's environment variables, you can just use them in the config as `${VAR_NAME}` without the need to explictly define them.
50+
To load variables from the user's environment variables, you can just use them in the config as `${VAR_NAME}` without the need to explicitly define them.
5151

52+
In order to specify a default value for an environment variable that is not defined, you can use:
53+
```yaml
54+
vars:
55+
MY_ENV_VAR:
56+
source: env
57+
default: my-default
58+
```
5259

5360
### From Command
5461
You can load the values from commands from custom commands via [config expressions](./expressions.mdx) or using the long form by specifying the `command` field:

0 commit comments

Comments
 (0)