summaryrefslogtreecommitdiff
path: root/tests/specs/permission/path_not_permitted/main.ts
blob: 0587db916b0a201edd6e323ee60140ec2c3c8607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const binaryName = Deno.build.os === "windows" ? "binary.exe" : "binary";
Deno.copyFileSync(Deno.execPath(), binaryName);

console.log("Running...");
new Deno.Command(
  Deno.execPath(),
  {
    args: [
      "run",
      "--allow-write",
      "--allow-read",
      `--allow-run=binary`,
      "sub.ts",
    ],
    env: {
      PATH: Deno.cwd(),
    },
    stderr: "inherit",
    stdout: "inherit",
  },
).outputSync();