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

Function writeSymlink

apps/desktop/src/main/cli-install.ts:401–412  ·  view source on GitHub ↗
(source: string, target: string)

Source from the content-addressed store, hash-verified

399}
400
401async function writeSymlink(source: string, target: string): Promise<void> {
402 try {
403 await fsp.symlink(source, target)
404 } catch (err) {
405 if ((err as NodeJS.ErrnoException).code === 'EEXIST') {
406 await fsp.rm(target, { force: true })
407 await fsp.symlink(source, target)
408 return
409 }
410 throw err
411 }
412}
413
414async function elevateAndSymlink(source: string, target: string): Promise<void> {
415 if (process.platform === 'darwin') {

Callers 1

installCliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected