mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
refactor: rewrite chown_test.ts not to depend on python (#8843)
This commit rewrites "chown_test.ts" to use the GNU "id" command instead of python. This won't work on Windows, but these tests aren't currently run on Windows anyway.
This commit is contained in:
parent
b1c2d21935
commit
4033b39036
1 changed files with 2 additions and 2 deletions
|
@ -12,11 +12,11 @@ async function getUidAndGid(): Promise<{ uid: number; gid: number }> {
|
|||
// get the user ID and group ID of the current process
|
||||
const uidProc = Deno.run({
|
||||
stdout: "piped",
|
||||
cmd: ["python", "-c", "import os; print(os.getuid())"],
|
||||
cmd: ["id", "-u"],
|
||||
});
|
||||
const gidProc = Deno.run({
|
||||
stdout: "piped",
|
||||
cmd: ["python", "-c", "import os; print(os.getgid())"],
|
||||
cmd: ["id", "-g"],
|
||||
});
|
||||
|
||||
assertEquals((await uidProc.status()).code, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue