What is wrong:newConfigEditCommand (internal/cli/config.go) uses the whole of $EDITOR as the program name. EDITOR="cat -n" vaultik config edit fails with exec: "cat -n": executable file not found in $PATH, exit 1; common settings such as code --wait or emacsclient -t fail the same way.
Definition of done
$EDITOR is run the way git and crontab run it (through the shell, with the file path as an argument), so an editor with arguments works and a path with spaces is passed safely.
A test covers an $EDITOR with an argument.
Model: opus-5-5
Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 1).
**What is wrong:** `newConfigEditCommand` (`internal/cli/config.go`) uses the whole of `$EDITOR` as the program name. `EDITOR="cat -n" vaultik config edit` fails with `exec: "cat -n": executable file not found in $PATH`, exit 1; common settings such as `code --wait` or `emacsclient -t` fail the same way.
**Definition of done**
- `$EDITOR` is run the way git and crontab run it (through the shell, with the file path as an argument), so an editor with arguments works and a path with spaces is passed safely.
- A test covers an `$EDITOR` with an argument.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 00:47:17 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Found by the defect hunt in #288 (part 1).
What is wrong:
newConfigEditCommand(internal/cli/config.go) uses the whole of$EDITORas the program name.EDITOR="cat -n" vaultik config editfails withexec: "cat -n": executable file not found in $PATH, exit 1; common settings such ascode --waitoremacsclient -tfail the same way.Definition of done
$EDITORis run the way git and crontab run it (through the shell, with the file path as an argument), so an editor with arguments works and a path with spaces is passed safely.$EDITORwith an argument.Model: opus-5-5