diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-11-11 17:04:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 17:04:57 +0100 |
commit | 7f0546a6b736430e6c39c55cfa77f39e70ffc9a2 (patch) | |
tree | 9d98dd492d9cc7212421cfcb113eb6d98df9f881 | |
parent | 38f0b41e7d16db24c1ba7c7cc7b536f4d7e169e9 (diff) |
fix(npm): remove forgotten unstable check (#16598)
-rw-r--r-- | cli/tests/integration/run_tests.rs | 10 | ||||
-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.out | 4 | ||||
-rw-r--r-- | runtime/ops/os/mod.rs | 4 |
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)?; |