1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

fix(npm): remove forgotten unstable check (#16598)

This commit is contained in:
Bartek Iwańczuk 2022-11-11 17:04:57 +01:00 committed by GitHub
parent 38f0b41e7d
commit 7f0546a6b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 15 deletions

View file

@ -2918,15 +2918,9 @@ itest!(nested_error {
exit_code: 1, 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", args: "run --unstable --no-prompt run/node_env_var_allowlist.ts",
output: "run/node_env_var_allowlist_with_unstable_flag.ts.out", output: "run/node_env_var_allowlist.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",
exit_code: 1, exit_code: 1,
}); });

View file

@ -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]

View file

@ -112,9 +112,7 @@ fn op_get_env(
state: &mut OpState, state: &mut OpState,
key: String, key: String,
) -> Result<Option<String>, AnyError> { ) -> Result<Option<String>, AnyError> {
let skip_permission_check = let skip_permission_check = NODE_ENV_VAR_ALLOWLIST.contains(&key);
state.borrow::<crate::ops::UnstableChecker>().unstable
&& NODE_ENV_VAR_ALLOWLIST.contains(&key);
if !skip_permission_check { if !skip_permission_check {
state.borrow_mut::<Permissions>().env.check(&key)?; state.borrow_mut::<Permissions>().env.check(&key)?;