From 0662f62db82026e44cfff7ec42776eb6c2c06cfa Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Mon, 2 Jun 2025 22:54:40 -0700 Subject: Significant logging improvements --- u/process/run.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'u/process/run.ts') diff --git a/u/process/run.ts b/u/process/run.ts index 7a74c3e..b09e64e 100644 --- a/u/process/run.ts +++ b/u/process/run.ts @@ -3,6 +3,7 @@ import { type IEither, type ITraceable, LogLevel, + type LogTraceSupplier, TraceUtil, } from "@emprespresso/pengueno"; @@ -13,8 +14,8 @@ type CommandOutputDecoded = { stderrText: string; }; -export const getStdout = ( - c: ITraceable, +export const getStdout = ( + c: ITraceable, options: Deno.CommandOptions = {}, ): Promise> => c @@ -44,8 +45,8 @@ export const getStdout = ( return { code, stdoutText, stderrText }; }) .mapLeft((e) => { - tEitherOut.trace.addTrace(LogLevel.ERROR).trace(`o.o wat ${e}`); - return new Error(`${e}`); + tEitherOut.trace.addTrace(LogLevel.ERROR).trace(e); + return e; }) .flatMap((decodedOutput): IEither => { const { code, stdoutText, stderrText } = decodedOutput; -- cgit v1.2.3-70-g09d2