summaryrefslogtreecommitdiff
path: root/u/process/run.ts
diff options
context:
space:
mode:
Diffstat (limited to 'u/process/run.ts')
-rw-r--r--u/process/run.ts9
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;