diff options
author | Bhuwan Pandit <bhuwanpandit109@gmail.com> | 2024-11-17 22:49:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-17 22:49:35 +0000 |
commit | cff6e280c77afb0bc42a10348eeef5360db8f361 (patch) | |
tree | a6920ecc1358b23661145b3c03607787a04ae9c6 /tests/specs/run/env_file/env_one | |
parent | 73411bb98a677727799122ebc397d825bf95b812 (diff) |
feat(cli): support multiple env file argument (#26527)
Closes #26425
## Overview
This PR adds support for specifying multiple environment files as
arguments when using the Deno CLI. Subsequent files override
pre-existing variables defined in previous files.
If the same variable is defined in the environment and in the file, the
value from the environment takes precedence.
## Example Usage
```bash
deno run --allow-env --env-file --env-file=".env.one" --env-file=".env.two" script.ts
```
---------
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'tests/specs/run/env_file/env_one')
-rw-r--r-- | tests/specs/run/env_file/env_one | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/specs/run/env_file/env_one b/tests/specs/run/env_file/env_one new file mode 100644 index 000000000..c26038a67 --- /dev/null +++ b/tests/specs/run/env_file/env_one @@ -0,0 +1,2 @@ +FOO=BARBAR +ANOTHER_FOO=OVERRIDEN_BY_ENV_ONE |