herdrdev/herdr · warning

remote herdr installation cancelled

Error message

remote herdr installation cancelled

What it means

At a remote installation confirmation prompt, answering 'n' or 'no' returns this Interrupted error and aborts the remote herdr installation. Unlike the yes-required prompts, any answer other than an explicit refusal proceeds.

Source

Thrown at src/remote/attach.rs:1608

        )));
    }

    eprintln!(
        "matching herdr {} is not installed on {target} for {}.",
        current_version(),
        remote_herdr.platform.asset_key()
    );
    eprint!(
        "Install {} to {}? [Y/n] ",
        source_description, remote_herdr.shell_path
    );
    io::stderr().flush()?;

    let mut answer = String::new();
    io::stdin().read_line(&mut answer)?;
    let answer = answer.trim().to_ascii_lowercase();
    if answer == "n" || answer == "no" {
        return Err(io::Error::new(
            io::ErrorKind::Interrupted,
            "remote herdr installation cancelled",
        ));
    }

    Ok(())
}

fn remote_bridge_command(remote_herdr: &RemoteHerdr, session_name: &str) -> String {
    let mut command = format!("exec {}", remote_herdr.shell_path);
    if session_name != crate::session::DEFAULT_SESSION_NAME {
        command.push_str(" --session ");
        command.push_str(&shell_quote(session_name));
    }
    command.push_str(" remote-client-bridge");
    command
}

View on GitHub (pinned to f457cff4f2)

Solutions

  1. Answer 'y' or accept the default to proceed with installation
  2. Pre-install herdr on the remote host to avoid the prompt entirely
  3. Ensure automation does not inject 'no' into stdin when unattended install is intended
Defensive patterns

Strategy: try-catch

Try / catch

if let Err(e) = attach() {
    if e.kind() == std::io::ErrorKind::Interrupted && e.to_string().contains("cancelled") {
        return Ok(()); // treat as clean user abort
    }
    return Err(e);
}

Prevention

When it happens

Trigger: Answering 'n' or 'no' at the stderr prompt asking to install herdr on the remote host during attach.

Common situations: User declines the install (cost/caution), or an automation script feeds 'no' via stdin inadvertently.

Related errors


AI-assisted analysis of herdrdev/herdr@f457cff4f2 (2026-08-28). Data as JSON: /api/errors/00a2173b7d6ad6ba. Report an issue: GitHub.