From 0f0d396f961a1bdac520a56bdc53e27b70ff6e08 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 18 Jun 2023 23:44:56 +0900 Subject: fix(nuldoc): migrate from deprecated API, Deno.run(), to Deno.Command --- nuldoc-src/commands/serve.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nuldoc-src/commands/serve.ts b/nuldoc-src/commands/serve.ts index ffb2020..aa5221d 100644 --- a/nuldoc-src/commands/serve.ts +++ b/nuldoc-src/commands/serve.ts @@ -9,10 +9,13 @@ export function runServeCommand(config: Config) { serve(async (req) => { const pathname = new URL(req.url).pathname; if (!pathname.endsWith("css") && !pathname.endsWith("svg")) { - const p = Deno.run({ - cmd: ["./nuldoc", "build"], - }); - await p.status(); + const command = new Deno.Command( + join(Deno.cwd(), "nuldoc"), + { + args: ["build"], + }, + ); + await command.output(); console.log("rebuild"); } const res = await serveDir(req, { -- cgit v1.2.3-70-g09d2