Hmbown/CodeWhale · error

dsh binary is unknown

Error message

dsh binary is unknown

What it means

`install_into_profile` needs the dsh executable to run `dsh plugin add`. It throws this when `detection.binary` is `None`, meaning the dsh binary could not be located at detection time, so bundle installation cannot proceed.

Solutions

  1. Install dsh or add it to PATH (`which dsh` should succeed) and re-run detection/connect.
  2. If dsh lives at a nonstandard path, point the integration's detection/config at it.
  3. Re-run the connect/update flow after installing so `detection.binary` is populated.
  4. In CI, ensure the image includes dsh before invoking bundle lifecycle commands.
Defensive patterns

Strategy: validation

Validate before calling

if detection.binary.is_none() {
    eprintln!("dsh binary not found; install dsh and re-run connect before installing bundles");
    return Ok(());
}

Prevention

When it happens

Trigger: Calling `install_into_profile` with a `DshDetection` whose `binary` is `None` — detection ran without finding the dsh executable in PATH or the configured location.

Common situations: dsh not installed at all; installed but not on PATH of the environment running codewhale; dsh uninstalled after connect; container/CI image missing the dsh binary.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/9c56c6d77ac9e3af. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/integrations/dsh/bundle.rs:447

        args: args.iter().map(|s| (*s).to_string()).collect(),
        success,
        output_sha256: sha256_hex(output.as_bytes()),
        output_excerpt: excerpt.chars().take(400).collect(),
    })
}

/// Install the app bundle (linked from the installed launcher) and then the
/// Codewhale bundle, in that order so Codewhale's rows patch last.
pub(crate) fn install_into_profile(
    runner: &dyn DshRunner,
    detection: &DshDetection,
    app: DshAppBundle,
    bundle_dir: &Path,
) -> Result<(PathBuf, Vec<PluginCommandOutcome>)> {
    let binary = detection
        .binary
        .as_ref()
        .ok_or_else(|| anyhow::anyhow!("dsh binary is unknown"))?;
    let app_source = app_bundle_source(binary, app)?;
    let mut outcomes = Vec::new();
    let app_source_str = app_source.display().to_string();
    let first = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &["add", &app_source_str])?;
    let first_ok = first.success;
    let first_excerpt = first.output_excerpt.clone();
    outcomes.push(first);
    if !first_ok {
        anyhow::bail!(
            "dsh plugin add {} failed: {}",
            app.package_name(),
            first_excerpt
        );
    }
    let bundle_str = bundle_dir.display().to_string();
    let second = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &["add", &bundle_str])?;
    let second_ok = second.success;
    let second_excerpt = second.output_excerpt.clone();

View on GitHub (pinned to 73e0f67d83)