mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 23:00:03 +00:00
refactor(cli): centralize process lifecycle
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { failCommand } from "./commandResult.js";
|
||||
import { existsSync, statSync } from "node:fs";
|
||||
import { resolve, basename } from "node:path";
|
||||
import { errorBox } from "../ui/format.js";
|
||||
@@ -72,7 +73,7 @@ export function resolveProject(
|
||||
// outside a project; the redaction in trackCliError strips the dir path.
|
||||
trackCommandFailure(process.argv[2] ?? "unknown", err);
|
||||
errorBox(err.title, err.hint, err.suggestion);
|
||||
process.exit(1);
|
||||
failCommand();
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user