(original: Error, dataDir: string)
| 45 | readonly errstr: unknown; |
| 46 | |
| 47 | constructor(original: Error, dataDir: string) { |
| 48 | super( |
| 49 | `${original.message} on the CodeGraph index at ${dataDir}\n` + |
| 50 | "This project is on a Windows drive, where SQLite's file locking doesn't work across " + |
| 51 | 'the Windows/WSL boundary, so this usually means CodeGraph on Windows is using the same ' + |
| 52 | "index. Windows and WSL can't share one index on a Windows drive; give WSL its own:\n" + |
| 53 | ` 1. Set CODEGRAPH_DIR=${WSL_CODEGRAPH_DIR} in the WSL environment (your shell profile, ` + |
| 54 | 'or the env of the MCP server your agent starts).\n' + |
| 55 | ` 2. Run "codegraph init" in WSL to build that index. Windows keeps using ${DEFAULT_CODEGRAPH_DIR}.`, |
| 56 | { cause: original } |
| 57 | ); |
| 58 | this.name = 'WslSharedIndexError'; |
| 59 | const codes = original as Error & { code?: unknown; errcode?: unknown; errstr?: unknown }; |
| 60 | this.code = codes.code; |
| 61 | this.errcode = codes.errcode; |
| 62 | this.errstr = codes.errstr; |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected