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

Function renderCliError

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

Source from the content-addressed store, hash-verified

1624};
1625
1626const renderCliError = (cause: Cause.Cause<unknown>): string => {
1627 const squashed = Cause.squash(cause);
1628 const raw = formatUnknownMessage(squashed);
1629 const normalized = normalizeCliErrorText(raw);
1630 if (normalized.length === 0) return "Unknown error";
1631 if (normalized !== raw.trim()) {
1632 return `${normalized}\n(run with --log-level debug for full details)`;
1633 }
1634 return normalized;
1635};
1636
1637const parsePositiveIntegerOption = (name: string, raw: string): number => {
1638 if (!/^\d+$/.test(raw)) {

Callers 1

main.tsFile · 0.85

Calls 2

normalizeCliErrorTextFunction · 0.90
formatUnknownMessageFunction · 0.85

Tested by

no test coverage detected