summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/tests/integration/run_tests.rs10
-rw-r--r--cli/tests/testdata/run/node_env_var_allowlist.ts.out (renamed from cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out)0
-rw-r--r--cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out4
-rw-r--r--runtime/ops/os/mod.rs4
4 files changed, 3 insertions, 15 deletions
diff --git a/cli/tests/integration/run_tests.rs b/cli/tests/integration/run_tests.rs
index 09fc7b426..fd60e85b7 100644
--- a/cli/tests/integration/run_tests.rs
+++ b/cli/tests/integration/run_tests.rs
@@ -2918,15 +2918,9 @@ itest!(nested_error {
exit_code: 1,
});
-itest!(node_env_var_allowlist_with_unstable_flag {
+itest!(node_env_var_allowlist {
args: "run --unstable --no-prompt run/node_env_var_allowlist.ts",
- output: "run/node_env_var_allowlist_with_unstable_flag.ts.out",
- exit_code: 1,
-});
-
-itest!(node_env_var_allowlist_without_unstable_flag {
- args: "run --no-prompt run/node_env_var_allowlist.ts",
- output: "run/node_env_var_allowlist_without_unstable_flag.ts.out",
+ output: "run/node_env_var_allowlist.ts.out",
exit_code: 1,
});
diff --git a/cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out b/cli/tests/testdata/run/node_env_var_allowlist.ts.out
index 62f335c0f..62f335c0f 100644
--- a/cli/tests/testdata/run/node_env_var_allowlist_with_unstable_flag.ts.out
+++ b/cli/tests/testdata/run/node_env_var_allowlist.ts.out
diff --git a/cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out b/cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out
deleted file mode 100644
index ac92cdb6b..000000000
--- a/cli/tests/testdata/run/node_env_var_allowlist_without_unstable_flag.ts.out
+++ /dev/null
@@ -1,4 +0,0 @@
-[WILDCARD]error: Uncaught PermissionDenied: Requires env access to "NODE_DEBUG", run again with the --allow-env flag
-console.log(Deno.env.get("NODE_DEBUG") ?? "ok");
- ^
- at [WILDCARD]
diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs
index a46f5740a..b93935955 100644
--- a/runtime/ops/os/mod.rs
+++ b/runtime/ops/os/mod.rs
@@ -112,9 +112,7 @@ fn op_get_env(
state: &mut OpState,
key: String,
) -> Result<Option<String>, AnyError> {
- let skip_permission_check =
- state.borrow::<crate::ops::UnstableChecker>().unstable
- && NODE_ENV_VAR_ALLOWLIST.contains(&key);
+ let skip_permission_check = NODE_ENV_VAR_ALLOWLIST.contains(&key);
if !skip_permission_check {
state.borrow_mut::<Permissions>().env.check(&key)?;