MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / renderCliError

Function renderCliError

apps/cli/src/main.ts:1529–1538  ·  view source on GitHub ↗
(cause: Cause.Cause<unknown>)

Source from the content-addressed store, hash-verified

1527};
1528
1529const renderCliError = (cause: Cause.Cause<unknown>): string => {
1530 const squashed = Cause.squash(cause);
1531 const raw = formatUnknownMessage(squashed);
1532 const normalized = normalizeCliErrorText(raw);
1533 if (normalized.length === 0) return "Unknown error";
1534 if (normalized !== raw.trim()) {
1535 return `${normalized}\n(run with --log-level debug for full details)`;
1536 }
1537 return normalized;
1538};
1539
1540const parsePositiveIntegerOption = (name: string, raw: string): number => {
1541 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected