Skip to content

Commit

Permalink
Show output when commands fail
Browse files Browse the repository at this point in the history
Signed-off-by: Miek Gieben <miek@miek.nl>
  • Loading branch information
miekg committed Aug 22, 2024
1 parent dc43992 commit 3b44fd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/pgod/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func parseCommand(s []string) (name, command string, args []string, error error)

func exitSession(ses ssh.Session, data []byte, err error) {
if err != nil {
warnSession(ses, fmt.Sprintf("An error occurred in command in connection for user %q: %s", ses.User(), err), http.StatusInternalServerError)
warnSession(ses, fmt.Sprintf("An error occurred in command in connection for user %q: %s\nCaptured output:\n%s", ses.User(), err, data), http.StatusInternalServerError)
return
}
ses.Write(data)
Expand Down

0 comments on commit 3b44fd2

Please sign in to comment.