blob: 73deeab9a7bbf00205dbda2dc14094aaebb762b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
const binaryName = Deno.build.os === "windows" ? "binary.exe" : "binary";
Deno.copyFileSync(Deno.execPath(), binaryName);
console.log("Running...");
const result = new Deno.Command(
Deno.execPath(),
{
args: ["run", "--allow-write", `--allow-run=./${binaryName}`, "sub.ts"],
stderr: "inherit",
stdout: "inherit",
},
).outputSync();
console.assert(result.code == 1, "Expected failure");
|