MCPcopy
hub / github.com/lingodotdev/lingo.dev / throwHelpError

Function throwHelpError

packages/cli/src/cli/cmd/init.ts:29–43  ·  view source on GitHub ↗
(option: string, value: string)

Source from the content-addressed store, hash-verified

27};
28
29const throwHelpError = (option: string, value: string) => {
30 if (value === "help") {
31 openUrl("/go/call");
32 }
33
34 // Better error message for invalid locale or bucket format inputs, with instructions to get help for supported formats
35 throw new Error(
36 `Invalid ${option}: "${value}".\n\n` +
37 `Accepted formats:\n` +
38 ` es,fr\n` +
39 ` es fr\n` +
40 ` 'es', 'fr'\n\n` +
41 `If you need support for "${value}" ${option}, type "help" and we will.`,
42 );
43};
44
45// Parses comma or space separated list of values, removing extra whitespace and quotes
46export const parseListInput = (value: string): string[] =>

Callers 1

init.tsFile · 0.85

Calls 1

openUrlFunction · 0.85

Tested by

no test coverage detected