mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 16:42:27 +00:00
fix(skills): keep the seam gate's preview attached so --project works again (#3463)
seam-gate verify --project has failed with "preview server exited early" since #3310, which made `hyperframes preview` pick its launch mode from the TTY. The gate spawns with stdio [ignore,pipe,pipe], so interactive is false and it silently took the background path: the launcher exits 0 before the server is serving (read as a dead server), and the detached server escapes the gate's process-group cleanup (leaking a preview per run). Pass the CLI's own --foreground opt-out in the default --server-cmd. Both skill mirrors updated. — Rames
This commit is contained in:
@@ -71,7 +71,12 @@ async function ensureServer() {
|
||||
const port = 5380 + Math.floor(Math.random() * 20);
|
||||
const env = { ...process.env };
|
||||
delete env.HYPERFRAME_RUNTIME_URL; // wrong value fails silently as 200 HTML
|
||||
const cmd = flag("server-cmd", `npx --yes hyperframes preview --no-open --port ${port}`);
|
||||
// `preview` backgrounds itself when stdin/stdout aren't TTYs, which they never are here: the
|
||||
// launcher would exit 0 before the server is up and detach it out of our process group.
|
||||
const cmd = flag(
|
||||
"server-cmd",
|
||||
`npx --yes hyperframes preview --foreground --no-open --port ${port}`,
|
||||
);
|
||||
const child = spawn("sh", ["-c", cmd.replace(/\{port\}/g, String(port))], {
|
||||
cwd: project,
|
||||
env,
|
||||
|
||||
Reference in New Issue
Block a user