diff options
author | Elizabeth <me@liz.coffee> | 2025-06-02 22:54:40 -0700 |
---|---|---|
committer | Elizabeth <me@liz.coffee> | 2025-06-02 22:54:40 -0700 |
commit | 0662f62db82026e44cfff7ec42776eb6c2c06cfa (patch) | |
tree | f59bc8eb82e5c075d2c59e547a42ceefdc1c3ffc /u/process | |
parent | 2ae2ebc8aa7c4600f499ab7d2264dcb1d16db4ae (diff) | |
download | ci-0662f62db82026e44cfff7ec42776eb6c2c06cfa.tar.gz ci-0662f62db82026e44cfff7ec42776eb6c2c06cfa.zip |
Significant logging improvements
Diffstat (limited to 'u/process')
-rw-r--r-- | u/process/run.ts | 9 |
1 files changed, 5 insertions, 4 deletions
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 = <Trace>( - c: ITraceable<Command, Trace>, +export const getStdout = ( + c: ITraceable<Command, LogTraceSupplier>, options: Deno.CommandOptions = {}, ): Promise<IEither<Error, string>> => c @@ -44,8 +45,8 @@ export const getStdout = <Trace>( 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<Error, string> => { const { code, stdoutText, stderrText } = decodedOutput; |