fix: adjust editor parsing to handle flags like --wait (#1160)

This commit is contained in:
Aiden Cline 2025-07-19 20:01:25 -05:00 committed by GitHub
parent 3386908fd6
commit faf8da8743
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -782,7 +782,8 @@ func (a appModel) executeCommand(command commands.Command) (tea.Model, tea.Cmd)
return a, toast.NewErrorToast("Something went wrong, couldn't open editor")
}
tmpfile.Close()
c := exec.Command(editor, tmpfile.Name()) //nolint:gosec
parts := strings.Fields(editor)
c := exec.Command(parts[0], append(parts[1:], tmpfile.Name())...) //nolint:gosec
c.Stdin = os.Stdin
c.Stdout = os.Stdout
c.Stderr = os.Stderr