@prover-coder-ai/docker-git 1.0.50 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -286,7 +286,13 @@ var runCommandWithExitCodes = (spec, okExitCodes, onFailure) => Effect.gen(funct
|
|
|
286
286
|
const exitCode = yield* _(Command.exitCode(buildCommand(spec, "inherit", "inherit", "inherit")));
|
|
287
287
|
yield* _(ensureExitCode(Number(exitCode), okExitCodes, onFailure));
|
|
288
288
|
});
|
|
289
|
-
var runCommandExitCode = (spec) => Effect.
|
|
289
|
+
var runCommandExitCode = (spec) => Effect.scoped(Effect.gen(function* (_) {
|
|
290
|
+
const process = yield* _((yield* _(CommandExecutor.CommandExecutor)).start(buildCommand(spec, "pipe", "pipe", "pipe")));
|
|
291
|
+
yield* _(Effect.forkDaemon(Stream.runDrain(process.stdout)));
|
|
292
|
+
yield* _(Effect.forkDaemon(Stream.runDrain(process.stderr)));
|
|
293
|
+
const exitCode = yield* _(process.exitCode);
|
|
294
|
+
return Number(exitCode);
|
|
295
|
+
}));
|
|
290
296
|
var collectUint8Array$1 = (chunks) => Chunk.reduce(chunks, new Uint8Array(), (acc, curr) => {
|
|
291
297
|
const next = new Uint8Array(acc.length + curr.length);
|
|
292
298
|
next.set(acc);
|
|
@@ -295,6 +301,7 @@ var collectUint8Array$1 = (chunks) => Chunk.reduce(chunks, new Uint8Array(), (ac
|
|
|
295
301
|
});
|
|
296
302
|
var runCommandCapture = (spec, okExitCodes, onFailure) => Effect.scoped(Effect.gen(function* (_) {
|
|
297
303
|
const process = yield* _((yield* _(CommandExecutor.CommandExecutor)).start(buildCommand(spec, "pipe", "pipe", "pipe")));
|
|
304
|
+
yield* _(Effect.forkDaemon(Stream.runDrain(process.stderr)));
|
|
298
305
|
const bytes = yield* _(pipe(process.stdout, Stream.runCollect, Effect.map((chunks) => collectUint8Array$1(chunks))));
|
|
299
306
|
const exitCode = yield* _(process.exitCode);
|
|
300
307
|
yield* _(ensureExitCode(Number(exitCode), okExitCodes, onFailure));
|