fix: sshCmd closure bug + error display
CRITICAL BUG: sshConnectCmd wrapped tea.ExecProcess inside an extra closure, so Bubble Tea never executed the SSH process — Enter appeared to do nothing. Fix: - sshConnectCmd now returns tea.ExecProcess directly (no extra closure) - tea.ExecProcess handles all process lifecycle (start, PTY, exit) - sshExitMsg errors are shown in host list view (ErrorStyle) - Error routed via Model.Error → HostListTab.err → View()
This commit is contained in:
@@ -121,6 +121,13 @@ func (t *HostListTab) View() string {
|
||||
|
||||
var b strings.Builder
|
||||
|
||||
// Show error if any
|
||||
if t.err != nil {
|
||||
b.WriteString(ErrorStyle.Render(fmt.Sprintf(" Error: %v ", t.err)))
|
||||
b.WriteString("\n")
|
||||
t.err = nil
|
||||
}
|
||||
|
||||
// Capped vertical padding
|
||||
b.WriteString(strings.Repeat("\n", 2))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user