From b16e6220a2483098b1d2d4564d3d09f08756fae3 Mon Sep 17 00:00:00 2001 From: restlessronin <88921269+restlessronin@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:08:40 +0530 Subject: fix: enable "--allow-sys=cpus" for "deno run" (#22260) Fixes #22221 with the suggested fix, and added "cpus" to the existing tests. --- runtime/permissions/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/permissions') diff --git a/runtime/permissions/mod.rs b/runtime/permissions/mod.rs index 89adab361..bdefe4f12 100644 --- a/runtime/permissions/mod.rs +++ b/runtime/permissions/mod.rs @@ -688,7 +688,7 @@ impl Descriptor for SysDescriptor { pub fn parse_sys_kind(kind: &str) -> Result<&str, AnyError> { match kind { "hostname" | "osRelease" | "osUptime" | "loadavg" | "networkInterfaces" - | "systemMemoryInfo" | "uid" | "gid" => Ok(kind), + | "systemMemoryInfo" | "uid" | "gid" | "cpus" => Ok(kind), _ => Err(type_error(format!("unknown system info kind \"{kind}\""))), } } -- cgit v1.2.3