Skip to content

[Deferred] Replace Unix-only VS Code CLI detection with cross-platform approach #58

@Cheezeiii365

Description

@Cheezeiii365

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions