{"record":{"id":"00a2173b7d6ad6ba","repo":"herdrdev/herdr","slug":"remote-herdr-installation-cancelled","errorCode":null,"errorMessage":"remote herdr installation cancelled","messagePattern":"remote herdr installation cancelled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/remote/attach.rs","lineNumber":1608,"sourceCode":"        )));\n    }\n\n    eprintln!(\n        \"matching herdr {} is not installed on {target} for {}.\",\n        current_version(),\n        remote_herdr.platform.asset_key()\n    );\n    eprint!(\n        \"Install {} to {}? [Y/n] \",\n        source_description, remote_herdr.shell_path\n    );\n    io::stderr().flush()?;\n\n    let mut answer = String::new();\n    io::stdin().read_line(&mut answer)?;\n    let answer = answer.trim().to_ascii_lowercase();\n    if answer == \"n\" || answer == \"no\" {\n        return Err(io::Error::new(\n            io::ErrorKind::Interrupted,\n            \"remote herdr installation cancelled\",\n        ));\n    }\n\n    Ok(())\n}\n\nfn remote_bridge_command(remote_herdr: &RemoteHerdr, session_name: &str) -> String {\n    let mut command = format!(\"exec {}\", remote_herdr.shell_path);\n    if session_name != crate::session::DEFAULT_SESSION_NAME {\n        command.push_str(\" --session \");\n        command.push_str(&shell_quote(session_name));\n    }\n    command.push_str(\" remote-client-bridge\");\n    command\n}\n","sourceCodeStart":1590,"sourceCodeEnd":1626,"githubUrl":"https://github.com/herdrdev/herdr/blob/f457cff4f2648eee85d176f8a41861241d4e8428/src/remote/attach.rs#L1590-L1626","documentation":"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.","triggerScenarios":"Answering 'n' or 'no' at the stderr prompt asking to install herdr on the remote host during attach.","commonSituations":"User declines the install (cost/caution), or an automation script feeds 'no' via stdin inadvertently.","solutions":["Answer 'y' or accept the default to proceed with installation","Pre-install herdr on the remote host to avoid the prompt entirely","Ensure automation does not inject 'no' into stdin when unattended install is intended"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = attach() {\n    if e.kind() == std::io::ErrorKind::Interrupted && e.to_string().contains(\"cancelled\") {\n        return Ok(()); // treat as clean user abort\n    }\n    return Err(e);\n}","preventionTips":["Pre-install herdr on remotes to avoid interactive gates","Ensure automation does not feed 'no' to stdin unexpectedly"],"tags":["user-prompt","interactive","remote-install","rust"],"backgroundTag":"user-confirmation-declined","analyzedSha":"f457cff4f2648eee85d176f8a41861241d4e8428","analyzedAt":"2026-08-28T15:41:09.197Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}