MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / execZen

Function execZen

integrations/raycast/src/lib/zen.ts:32–48  ·  view source on GitHub ↗
(
  args: string[],
)

Source from the content-addressed store, hash-verified

30}
31
32export async function execZen(
33 args: string[],
34): Promise<{ stdout: string; stderr: string }> {
35 const missingErrors: unknown[] = [];
36
37 for (const candidate of zenCandidates()) {
38 try {
39 return await execFileWithClosedStdin(candidate, args);
40 } catch (err) {
41 if (!isMissingExecutableError(err)) throw err;
42 missingErrors.push(err);
43 }
44 }
45
46 if (missingErrors.length > 0) throw new ZenCliNotFoundError();
47 throw new Error("ZenNotes CLI not found");
48}
49
50function execFileWithClosedStdin(
51 file: string,

Callers 4

loadNotesFunction · 0.90
updateNoteArchiveStateFunction · 0.90
moveNoteToTrashFunction · 0.90
loadVaultRootFunction · 0.85

Calls 3

zenCandidatesFunction · 0.85
execFileWithClosedStdinFunction · 0.85
isMissingExecutableErrorFunction · 0.85

Tested by

no test coverage detected