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

Function renderCliError

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

Source from the content-addressed store, hash-verified

1550};
1551
1552const renderCliError = (cause: Cause.Cause<unknown>): string => {
1553 const squashed = Cause.squash(cause);
1554 const raw = formatUnknownMessage(squashed);
1555 const normalized = normalizeCliErrorText(raw);
1556 if (normalized.length === 0) return "Unknown error";
1557 if (normalized !== raw.trim()) {
1558 return `${normalized}\n(run with --log-level debug for full details)`;
1559 }
1560 return normalized;
1561};
1562
1563const parsePositiveIntegerOption = (name: string, raw: string): number => {
1564 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected