herdrdev/herdr · warning
remote herdr install cancelled
Error message
remote herdr install cancelled
What it means
When the remote herdr binary is missing and interactive install is enabled, herdr prompts on stderr asking whether to install it. If the user answers anything other than 'y' or 'yes', this Interrupted error is returned, aborting the attach flow.
Source
Thrown at src/remote/attach.rs:1102
let status = match remote_server_status(ssh, remote_herdr) {
Ok(status) => status,
Err(err) => {
if !io::stdin().is_terminal() {
return Err(io::Error::other(format!(
"could not inspect the running remote herdr server on {target} before installing: {err}; run from an interactive terminal to approve updating the remote binary"
)));
}
eprintln!(
"could not inspect the running remote herdr server on {target} before installing: {err}"
);
eprint!("continue installing the remote herdr binary? [y/N] ");
io::stderr().flush()?;
let mut answer = String::new();
io::stdin().read_line(&mut answer)?;
let answer = answer.trim().to_ascii_lowercase();
if answer != "y" && answer != "yes" {
return Err(io::Error::new(
io::ErrorKind::Interrupted,
"remote herdr install cancelled",
));
}
return Ok(false);
}
};
let RemoteServerStatus::Running {
version,
protocol,
live_handoff,
detached_server_daemon,
} = &status
else {
return Ok(false);
};
let plan = remote_install_running_server_plan(
version.as_deref(),View on GitHub (pinned to f457cff4f2)
Solutions
- Answer 'y' or 'yes' at the prompt to proceed with installation
- Pre-install herdr on the remote host so no prompt appears
- Set the appropriate non-interactive/force flag or env var if available instead of relying on the prompt
- Check for a --yes/-y style flag on the attach command
Defensive patterns
Strategy: try-catch
Try / catch
match attach() {
Err(e) if e.kind() == std::io::ErrorKind::Interrupted && e.to_string().contains("cancelled") => {
// user declined; exit quietly with a distinct code
std::process::exit(130);
}
other => other,
} Prevention
- Pre-install herdr on remotes used by automation
- Provide a TTY when interactive prompts are expected
- Detect the Interrupted kind and map it to a 'user cancelled' exit path
When it happens
Trigger: Running herdr remote attach against a host without herdr installed, then answering 'n', pressing Enter on an empty line, or EOF/piped input that yields a non-yes answer at the confirmation prompt.
Common situations: Scripts or CI piping stdin so read_line returns empty/EOF, a user declining an unexpected install prompt, or non-interactive shells where the prompt cannot be answered.
Related errors
- remote herdr installation cancelled
- remote herdr server stop cancelled
- api request line is too large
- timed out reading api request
- timed out waiting for app response after {} ms
AI-assisted analysis of herdrdev/herdr@f457cff4f2 (2026-08-28).
Data as JSON: /api/errors/c0dbd7ae9267d136.
Report an issue: GitHub.