You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deno run without --allow-env permission prompts as expected:
SOME_ENV_VAR=1 deno run test.ts
# ┏ ⚠️ Deno requests env access to "SOME_ENV_VAR".# ┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.# ┠─ Learn more at: https://docs.deno.com/go/--allow-env# ┠─ Run again with --allow-env to bypass this prompt.# ┗ Allow? [y/n/A] (y = yes, allow; n = no, deny; A = allow all env permissions) >
However, deno test without --allow-env silently returns undefined (expected to throw error, as deno test doesn't prompt for permissions):
SOME_ENV_VAR=1 deno test test.ts
# Check file:///path/to/test.ts# ------- pre-test output -------# undefined# ----- pre-test output end -----# running 0 tests from ./test.ts## ok | 0 passed | 0 failed (2ms)
Conversely, deno testing the equivalent code with Deno.env.get('SOME_ENV_VAR') throws as expected.
The text was updated successfully, but these errors were encountered:
Version: Deno 2.1.10
With the following file
test.ts
:deno run
without--allow-env
permission prompts as expected:However,
deno test
without--allow-env
silently returnsundefined
(expected to throw error, asdeno test
doesn't prompt for permissions):Conversely,
deno test
ing the equivalent code withDeno.env.get('SOME_ENV_VAR')
throws as expected.The text was updated successfully, but these errors were encountered: