mirror of
https://github.com/denoland/deno.git
synced 2024-12-11 18:17:48 -05:00
cff6e280c7
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>
20 lines
543 B
Text
20 lines
543 B
Text
{
|
|
"tests": {
|
|
"basic": {
|
|
"args": "run --env=./env --allow-env env_file.ts",
|
|
"output": "env_file.out"
|
|
},
|
|
"missing": {
|
|
"args": "run --env=./missing --allow-env env_file.ts",
|
|
"output": "env_file_missing.out"
|
|
},
|
|
"multiple": {
|
|
"args": "run --env=./env --env=./env_one --env=./env_two --allow-env env_file.ts",
|
|
"output": "multiple_env_file.out"
|
|
},
|
|
"unparseable": {
|
|
"args": "run --env=./env_unparseable --allow-env env_file.ts",
|
|
"output": "env_unparseable.out"
|
|
}
|
|
}
|
|
}
|