-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
On Windows, the /editor command fails with an EINVAL error when the EDITOR environment variable points to a .bat (batch) file.
Auggie displays:
Editor error: spawnSync C:\path\to\my-editor.bat EINVAL
What did you expect to happen?
The external editor should open with the current input content.
Steps to reproduce
Steps to reproduce:
- Set
EDITORenvironment variable to a.batfile, e.g.:set EDITOR=C:\path\to\my-editor.bat - Launch auggie
- Type
/editoror press Ctrl+O
Auggie version
0.17.0 (commit 8f26412e)
Request ID
No messages found
Environment details
Environment
- OS: Windows 11
- Shell: powershell 7.5.4
- Tool/CLI version:
Anything else we need to know?
Possible root cause:
Node.js's spawnSync() cannot directly execute .bat files on Windows. Batch files must be run through cmd.exe /c or by using the shell: true option in the spawn options (see https://nodejs.org/api/child_process.html#spawning-bat-and-cmd-files-on-windows).
Suggested fix:
When spawning the editor process on Windows, either:
- Use
shell: truein the spawn options, or - Detect
.bat/.cmdextensions and spawn viacmd.exe /c <editor> <args>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working