aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/mod.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 851066eb..1e0beded 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -86,8 +86,15 @@ impl std::fmt::Display for ClientError {
ClientError::ServerShutdown { reason } => {
match reason.as_deref() {
Some("detached") => {
- write!(f, "detached from server")?;
- write!(f, "\nRun `herdr` to reattach")?;
+ if let Ok(reattach_command) =
+ std::env::var(crate::remote::REATTACH_COMMAND_ENV_VAR)
+ {
+ write!(f, "detached from remote server")?;
+ write!(f, "\nRun `{reattach_command}` to reattach")?;
+ } else {
+ write!(f, "detached from server")?;
+ write!(f, "\nRun `herdr` to reattach")?;
+ }
}
_ => {
write!(f, "server shut down")?;