Skip to content

Commit 572a4c8

Browse files
phaermatthiasbeyer
andcommitted
Improve error on failed quit
The error message in PtyReplSessions Drop impl implies that the subprocess is "bash", which isn't necessarily true and might confuse users. So we print the process name instead Co-authored-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: phaer <hello@phaer.org>
1 parent 59213cd commit 572a4c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl Drop for PtyReplSession {
342342
if let Some(ref cmd) = self.quit_command {
343343
self.pty_session
344344
.send_line(cmd)
345-
.expect("could not run `exit` on bash process");
345+
.expect(&format!("could not run `{}` on child process", cmd));
346346
}
347347
}
348348
}

0 commit comments

Comments
 (0)