| 22 | ).version as string; |
| 23 | |
| 24 | function run(args: string[]): string { |
| 25 | return execFileSync(process.execPath, [BIN, ...args], { |
| 26 | encoding: 'utf-8', |
| 27 | // Skip the daemon and the wasm-flag re-exec so the command resolves in a |
| 28 | // single fast process (no graph work happens for a version print anyway). |
| 29 | env: { ...process.env, CODEGRAPH_NO_DAEMON: '1', CODEGRAPH_WASM_RELAUNCHED: '1' }, |
| 30 | stdio: ['ignore', 'pipe', 'pipe'], |
| 31 | }).trim(); |
| 32 | } |
| 33 | |
| 34 | describe('codegraph version affordances', () => { |
| 35 | for (const spelling of ['version', '-v', '-version', '--version', '-V']) { |