mirror of
https://github.com/sst/opencode.git
synced 2025-07-22 23:35:01 +00:00
fix: adjust editor parsing to handle flags like --wait (#1160)
This commit is contained in:
parent
3386908fd6
commit
faf8da8743
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue