Release v0.7.1: Add approval-runs list alias, handle EPIPE, and improve summary hints
Binaries / Build & Release Binaries (push) Has been cancelled

This commit is contained in:
gitea committed 2026-08-25 15:19:11 +08:00
1 parent b998a0527e
commit e716f069ed
8 files changed
+84 -58

No files matched your search

+19 -2
View File
@@ -4,6 +4,13 @@ import { fileURLToPath } from "node:url";
import { runCli } from "./cli/runner.js";
import { isCompiledBinary, resolveAppRoot, resolveDefaultLauncher } from "./core/runtime.js";
process.stdout.on("error", (err: any) => {
if (err?.code === "EPIPE") process.exit(0);
});
process.stderr.on("error", (err: any) => {
if (err?.code === "EPIPE") process.exit(0);
});
const entryFile = fileURLToPath(import.meta.url);
const isCompiled = isCompiledBinary();
const appRoot = resolveAppRoot(entryFile, isCompiled);
@@ -15,6 +22,16 @@ const result = await runCli(Bun.argv.slice(2), {
launcher
});
if (result.stdout) process.stdout.write(result.stdout);
if (result.stderr) process.stderr.write(`${result.stderr}${result.stderr.endsWith("\n") ? "" : "\n"}`);
try {
if (result.stdout) process.stdout.write(result.stdout);
} catch (err: any) {
if (err?.code !== "EPIPE") throw err;
}
try {
if (result.stderr) process.stderr.write(`${result.stderr}${result.stderr.endsWith("\n") ? "" : "\n"}`);
} catch (err: any) {
if (err?.code !== "EPIPE") throw err;
}
process.exitCode = result.exitCode;