mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: show actual error if command fails
This commit is contained in:
parent
8a0e773add
commit
3c0baf5a04
1 changed files with 2 additions and 2 deletions
|
|
@ -826,7 +826,7 @@ func (a *App) SendCommand(ctx context.Context, command string, args string) (*Ap
|
|||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to execute command", "error", err)
|
||||
return toast.NewErrorToast("Failed to execute command")()
|
||||
return toast.NewErrorToast(fmt.Sprintf("Failed to execute command: %v", err))()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
|
@ -858,7 +858,7 @@ func (a *App) SendShell(ctx context.Context, command string) (*App, tea.Cmd) {
|
|||
)
|
||||
if err != nil {
|
||||
slog.Error("Failed to submit shell command", "error", err)
|
||||
return toast.NewErrorToast("Failed to submit shell command")()
|
||||
return toast.NewErrorToast(fmt.Sprintf("Failed to submit shell command: %v", err))()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue