From cff6e280c77afb0bc42a10348eeef5360db8f361 Mon Sep 17 00:00:00 2001 From: Bhuwan Pandit Date: Sun, 17 Nov 2024 22:49:35 +0000 Subject: feat(cli): support multiple env file argument (#26527) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/specs/run/env_file/env_unparseable | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/specs/run/env_file/env_unparseable (limited to 'tests/specs/run/env_file/env_unparseable') diff --git a/tests/specs/run/env_file/env_unparseable b/tests/specs/run/env_file/env_unparseable new file mode 100644 index 000000000..5542b80bc --- /dev/null +++ b/tests/specs/run/env_file/env_unparseable @@ -0,0 +1,4 @@ +FOO=valid +ANOTHER_FOO=c:\path +MULTILINE="First Line +Second Line" \ No newline at end of file -- cgit v1.2.3