Skip to content

Commit c109487

Browse files
authored
--env-file looks in parent directories (#1318)
1 parent 1e20796 commit c109487

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

runtime/reference/env_variables.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ console.log(Deno.env.has("FIREBASE_AUTH_DOMAIN")); // true
2727

2828
Deno supports `.env` files. You can cause Deno to read environment variables
2929
from `.env` using the `--env-file` flag: `deno run --env-file <script>`. This
30-
will read `.env` by default; if you want or need to load environment variables
31-
from a different file, you can specify that file as a parameter to the flag.
30+
will read `.env` from the current working directory or the first parent
31+
directory that contains one; if you want to load environment variables from a
32+
different file, you can specify that file as a parameter to the flag.
3233
Additionally, you can pass multiple `--env-file` flags (e.g.,
3334
`deno run --env-file=.env.one --env-file=.env.two --allow-env <script>`) to load
3435
variables from multiple files.

0 commit comments

Comments
 (0)