MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / breakSharedMemory

Function breakSharedMemory

__tests__/wsl-shared-index.test.ts:217–220  ·  view source on GitHub ↗

Replace the index's `-shm` with a FIFO: SQLite's first read then fails with a real SQLITE_IOERR.

(dbPath: string)

Source from the content-addressed store, hash-verified

215
216/** Replace the index's `-shm` with a FIFO: SQLite's first read then fails with a real SQLITE_IOERR. */
217function breakSharedMemory(dbPath: string): void {
218 fs.rmSync(`${dbPath}-shm`, { force: true });
219 execFileSync('mkfifo', [`${dbPath}-shm`]);
220}
221
222// mkfifo is POSIX-only.
223describe.runIf(process.platform !== 'win32')('a real SQLite I/O error on open', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected