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

Function renderCliError

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

Source from the content-addressed store, hash-verified

1635};
1636
1637const renderCliError = (cause: Cause.Cause<unknown>): string => {
1638 const squashed = Cause.squash(cause);
1639 const raw = formatUnknownMessage(squashed);
1640 const normalized = normalizeCliErrorText(raw);
1641 if (normalized.length === 0) return "Unknown error";
1642 if (normalized !== raw.trim()) {
1643 return `${normalized}\n(run with --log-level debug for full details)`;
1644 }
1645 return normalized;
1646};
1647
1648const parsePositiveIntegerOption = (name: string, raw: string): number => {
1649 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected