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

Function ensureDevWrapper

apps/desktop/src/main/cli-install.ts:77–90  ·  view source on GitHub ↗
(cliJsPath: string)

Source from the content-addressed store, hash-verified

75}
76
77async function ensureDevWrapper(cliJsPath: string): Promise<string> {
78 const dir = path.join(app.getPath('userData'), 'cli')
79 const target = path.join(dir, WRAPPER_NAME)
80 await fsp.mkdir(dir, { recursive: true })
81 const electronBinary = process.execPath
82 const script = [
83 '#!/bin/sh',
84 '# Auto-generated dev wrapper for the ZenNotes CLI.',
85 `ELECTRON_RUN_AS_NODE=1 exec "${electronBinary}" "${cliJsPath}" "$@"`,
86 ''
87 ].join('\n')
88 await fsp.writeFile(target, script, { mode: 0o755 })
89 return target
90}
91
92/* ---------- PATH discovery -------------------------------------------- */
93

Callers 1

locateWrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected