{"record":{"id":"9c56c6d77ac9e3af","repo":"Hmbown/CodeWhale","slug":"dsh-binary-is-unknown","errorCode":null,"errorMessage":"dsh binary is unknown","messagePattern":"dsh binary is unknown","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/dsh/bundle.rs","lineNumber":447,"sourceCode":"        args: args.iter().map(|s| (*s).to_string()).collect(),\n        success,\n        output_sha256: sha256_hex(output.as_bytes()),\n        output_excerpt: excerpt.chars().take(400).collect(),\n    })\n}\n\n/// Install the app bundle (linked from the installed launcher) and then the\n/// Codewhale bundle, in that order so Codewhale's rows patch last.\npub(crate) fn install_into_profile(\n    runner: &dyn DshRunner,\n    detection: &DshDetection,\n    app: DshAppBundle,\n    bundle_dir: &Path,\n) -> Result<(PathBuf, Vec<PluginCommandOutcome>)> {\n    let binary = detection\n        .binary\n        .as_ref()\n        .ok_or_else(|| anyhow::anyhow!(\"dsh binary is unknown\"))?;\n    let app_source = app_bundle_source(binary, app)?;\n    let mut outcomes = Vec::new();\n    let app_source_str = app_source.display().to_string();\n    let first = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &[\"add\", &app_source_str])?;\n    let first_ok = first.success;\n    let first_excerpt = first.output_excerpt.clone();\n    outcomes.push(first);\n    if !first_ok {\n        anyhow::bail!(\n            \"dsh plugin add {} failed: {}\",\n            app.package_name(),\n            first_excerpt\n        );\n    }\n    let bundle_str = bundle_dir.display().to_string();\n    let second = run_dsh_plugin(runner, binary, BUNDLE_PROFILE, &[\"add\", &bundle_str])?;\n    let second_ok = second.success;\n    let second_excerpt = second.output_excerpt.clone();","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/integrations/dsh/bundle.rs#L429-L465","documentation":"`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.","triggerScenarios":"Calling `install_into_profile` with a `DshDetection` whose `binary` is `None` — detection ran without finding the dsh executable in PATH or the configured location.","commonSituations":"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.","solutions":["Install dsh or add it to PATH (`which dsh` should succeed) and re-run detection/connect.","If dsh lives at a nonstandard path, point the integration's detection/config at it.","Re-run the connect/update flow after installing so `detection.binary` is populated.","In CI, ensure the image includes dsh before invoking bundle lifecycle commands."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if detection.binary.is_none() {\n    eprintln!(\"dsh binary not found; install dsh and re-run connect before installing bundles\");\n    return Ok(());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install dsh before running codewhale bundle lifecycle commands","Re-run detection/connect after installing or upgrading dsh","Ensure CI images include dsh on PATH"],"tags":["dsh","binary-not-found","bundle-install"],"backgroundTag":"command-not-found","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}