From c023223a5253ea56d6000febbf1cf307ef0e9f56 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 12 Jan 2024 16:57:40 -0500 Subject: [PATCH] getReader().read() only returns the first line closes #270 --- lib/hooks/usePantry.getVersions.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/hooks/usePantry.getVersions.ts b/lib/hooks/usePantry.getVersions.ts index 6600e251..05f0a2ee 100644 --- a/lib/hooks/usePantry.getVersions.ts +++ b/lib/hooks/usePantry.getVersions.ts @@ -305,9 +305,7 @@ async function handleTransformer(transform: string, versions: string[]): Promise `)); await writer.close() - const read = cmd.stdout.getReader().read().then(x => x.value) - - const [out, { success: ok }] = await Promise.all([read, cmd.status]) + const { stdout: out, success: ok } = await cmd.output() if (!ok) throw new Error("failed to run version transformer")