2020-01-26 13:43:59 -05:00
|
|
|
try {
|
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
const fetchProc = Deno.run({
|
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2020-03-21 17:44:18 -04:00
|
|
|
cmd: [
|
2020-01-26 13:43:59 -05:00
|
|
|
Deno.execPath(),
|
2020-04-07 11:24:47 -04:00
|
|
|
"cache",
|
2020-01-26 13:43:59 -05:00
|
|
|
"--reload",
|
|
|
|
"--lock=lock_write_fetch.json",
|
|
|
|
"--lock-write",
|
2020-03-28 13:03:49 -04:00
|
|
|
"https_import.ts",
|
|
|
|
],
|
2020-01-26 13:43:59 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const fetchCode = (await fetchProc.status()).code;
|
|
|
|
console.log(`fetch code: ${fetchCode}`);
|
|
|
|
|
|
|
|
const fetchCheckProc = Deno.run({
|
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2020-03-21 17:44:18 -04:00
|
|
|
cmd: [
|
2020-01-26 13:43:59 -05:00
|
|
|
Deno.execPath(),
|
2020-04-07 11:24:47 -04:00
|
|
|
"cache",
|
2020-01-26 13:43:59 -05:00
|
|
|
"--lock=lock_write_fetch.json",
|
2020-03-28 13:03:49 -04:00
|
|
|
"https_import.ts",
|
|
|
|
],
|
2020-01-26 13:43:59 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const fetchCheckProcCode = (await fetchCheckProc.status()).code;
|
|
|
|
console.log(`fetch check code: ${fetchCheckProcCode}`);
|
|
|
|
|
2020-05-29 02:43:31 -04:00
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|
|
|
|
|
2020-01-26 13:43:59 -05:00
|
|
|
const runProc = Deno.run({
|
|
|
|
stdout: "null",
|
|
|
|
stderr: "null",
|
2020-05-04 07:03:30 -04:00
|
|
|
cmd: [
|
|
|
|
Deno.execPath(),
|
|
|
|
"run",
|
|
|
|
"--lock=lock_write_fetch.json",
|
2020-05-29 02:43:31 -04:00
|
|
|
"--lock-write",
|
|
|
|
"--allow-read",
|
|
|
|
"file_exists.ts",
|
|
|
|
"lock_write_fetch.json",
|
2020-05-04 07:03:30 -04:00
|
|
|
],
|
2020-01-26 13:43:59 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
const runCode = (await runProc.status()).code;
|
|
|
|
console.log(`run code: ${runCode}`);
|
|
|
|
|
|
|
|
Deno.removeSync("./lock_write_fetch.json");
|