diff options
author | restlessronin <88921269+restlessronin@users.noreply.github.com> | 2024-02-07 12:08:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-07 06:38:40 +0000 |
commit | b16e6220a2483098b1d2d4564d3d09f08756fae3 (patch) | |
tree | 8f1d39462703b5c94ac1ab437f21025df6d9e937 /runtime/permissions/mod.rs | |
parent | 6c15dc3f061b1d3a5b014fdbf79686ce60c605d4 (diff) |
fix: enable "--allow-sys=cpus" for "deno run" (#22260)
Fixes #22221 with the suggested fix, and added "cpus" to the existing
tests.
Diffstat (limited to 'runtime/permissions/mod.rs')
-rw-r--r-- | runtime/permissions/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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}\""))), } } |