mirror of
https://github.com/denoland/deno.git
synced 2024-12-30 11:16:38 -05:00
45 lines
946 B
TypeScript
45 lines
946 B
TypeScript
|
try {
|
||
|
Deno.removeSync("./lock_write_fetch.json");
|
||
|
} catch {}
|
||
|
|
||
|
const fetchProc = Deno.run({
|
||
|
stdout: "null",
|
||
|
stderr: "null",
|
||
|
args: [
|
||
|
Deno.execPath(),
|
||
|
"fetch",
|
||
|
"--reload",
|
||
|
"--lock=lock_write_fetch.json",
|
||
|
"--lock-write",
|
||
|
"https_import.ts"
|
||
|
]
|
||
|
});
|
||
|
|
||
|
const fetchCode = (await fetchProc.status()).code;
|
||
|
console.log(`fetch code: ${fetchCode}`);
|
||
|
|
||
|
const fetchCheckProc = Deno.run({
|
||
|
stdout: "null",
|
||
|
stderr: "null",
|
||
|
args: [
|
||
|
Deno.execPath(),
|
||
|
"fetch",
|
||
|
"--lock=lock_write_fetch.json",
|
||
|
"https_import.ts"
|
||
|
]
|
||
|
});
|
||
|
|
||
|
const fetchCheckProcCode = (await fetchCheckProc.status()).code;
|
||
|
console.log(`fetch check code: ${fetchCheckProcCode}`);
|
||
|
|
||
|
const runProc = Deno.run({
|
||
|
stdout: "null",
|
||
|
stderr: "null",
|
||
|
args: [Deno.execPath(), "--lock=lock_write_fetch.json", "https_import.ts"]
|
||
|
});
|
||
|
|
||
|
const runCode = (await runProc.status()).code;
|
||
|
console.log(`run code: ${runCode}`);
|
||
|
|
||
|
Deno.removeSync("./lock_write_fetch.json");
|