fix(node): Implement fs.lchown (and process.getegid) (#24418)

Closes https://github.com/denoland/deno/issues/21260.
Part of https://github.com/denoland/deno/issues/18218.

Implements `node:fs.lchown`, and enables the node_compat test for it.
The test uses `process.getegid`, which we didn't have implemented, so I
went ahead and implemented that as well to get the test working.
This commit is contained in:
Nathan Whitaker 2024-07-05 11:32:51 -07:00 committed by GitHub
parent 28d2ff7bdc
commit d4d3a3c54f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 310 additions and 5 deletions

View file

@ -915,7 +915,9 @@ impl Descriptor for SysDescriptor {
pub fn parse_sys_kind(kind: &str) -> Result<&str, AnyError> {
match kind {
"hostname" | "osRelease" | "osUptime" | "loadavg" | "networkInterfaces"
| "systemMemoryInfo" | "uid" | "gid" | "cpus" | "homedir" => Ok(kind),
| "systemMemoryInfo" | "uid" | "gid" | "cpus" | "homedir" | "getegid" => {
Ok(kind)
}
_ => Err(type_error(format!("unknown system info kind \"{kind}\""))),
}
}