MCPcopy Create free account
hub / github.com/ProtonDriveApps/sdk / runSingleInvocation

Function runSingleInvocation

cli/src/cli/run.ts:12–30  ·  view source on GitHub ↗
(commands: Command[], argv: string[], initOptions: InitConfig)

Source from the content-addressed store, hash-verified

10
11export type CliSession = Awaited<ReturnType<typeof init>>;
12
13export async function runSingleInvocation(commands: Command[], argv: string[], initOptions: InitConfig): Promise<void> {
14 try {
15 await runCommand(commands, argv, initOptions);
16 } catch (error: unknown) {
17 if (error instanceof ExitError) {
18 process.exit(2);
19 return;
20 }
21 if (isRecoverableReplError(error)) {
22 console.error(error instanceof Error ? error.message : String(error));
23 process.exit(1);
24 return;
25 }
26 reportFatalError(error);
27 captureException(error);
28 await flushSentry();
29 process.exit(1);
30 }
31}
32
33export async function runCommand(

Callers 1

runFunction · 0.90

Calls 6

isRecoverableReplErrorFunction · 0.90
captureExceptionFunction · 0.90
flushSentryFunction · 0.90
runCommandFunction · 0.85
reportFatalErrorFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected