summaryrefslogtreecommitdiff
path: root/tests/specs/permission/proc_self_fd/main.js
blob: 86d8334cbb9d25d9eb5705a490d55ee6c847e505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// This test is Linux/Darwin only
if (Deno.build.os !== "linux" && Deno.build.os !== "darwin") {
  console.log("hi\n\n0");
  Deno.exit(123);
}

const cmd = new Deno.Command("/usr/bin/env", {
  args: [
    "bash",
    "-c",
    [Deno.execPath(), "run", "--allow-read", "reader.ts", '<(echo "hi")'].join(
      " ",
    ),
  ],
}).spawn();

console.log((await cmd.status).code);
Deno.exit(123);