Background
Deferred from branch openinvs review.
Reviewer comment: execSync('command -v code') is POSIX-only and breaks on Windows where cmd.exe has no command builtin.
What needs to be done
Remove the execSync('command -v code') pre-flight check in the OPEN_IN_VSCODE handler (packages/main/src/index.ts ~line 1079). Instead, call execFile('code', ...) directly and handle ENOENT to detect when VS Code is not installed. This works cross-platform without shell-specific builtins.
Why it was deferred
Technically valid feedback, but the project targets macOS first, Linux second, Windows third. Both current priority platforms have POSIX shells where command -v works correctly. This should be addressed when Windows support is actively being worked on.
Affected area
- File:
packages/main/src/index.ts (OPEN_IN_VSCODE handler, ~line 1063-1090)
Notes
Small change (~5 lines). No architectural debt accumulates from deferring.
Background
Deferred from branch
openinvsreview.Reviewer comment:
execSync('command -v code')is POSIX-only and breaks on Windows wherecmd.exehas nocommandbuiltin.What needs to be done
Remove the
execSync('command -v code')pre-flight check in theOPEN_IN_VSCODEhandler (packages/main/src/index.ts~line 1079). Instead, callexecFile('code', ...)directly and handleENOENTto detect when VS Code is not installed. This works cross-platform without shell-specific builtins.Why it was deferred
Technically valid feedback, but the project targets macOS first, Linux second, Windows third. Both current priority platforms have POSIX shells where
command -vworks correctly. This should be addressed when Windows support is actively being worked on.Affected area
packages/main/src/index.ts(OPEN_IN_VSCODE handler, ~line 1063-1090)Notes
Small change (~5 lines). No architectural debt accumulates from deferring.