mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
21 lines
421 B
TypeScript
21 lines
421 B
TypeScript
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();
|