Hmbown/CodeWhale · error

no bundle is installed

Error message

no bundle is installed

What it means

`run_dsh` with `RemoveBundle` extracts the installed bundle from the connection record (`record.bundle`) and throws this error when neither the record nor its bundle field exists. There is nothing to remove, so the removal flow aborts instead of running the `dsh plugin ... remove` commands.

Solutions

  1. Check status first (`codewhale status` / status report) and only run remove-bundle when a bundle is reported installed.
  2. If nothing is installed, no action is needed — the target state is already reached; skip the command.
  3. If a bundle was manually deleted, reconnect/update so the record refreshes, then re-check status.
  4. If the record is stale but files remain under the bundle dir, remove `paths.bundle_dir` manually per the printed plan.
Defensive patterns

Strategy: validation

Validate before calling

let (_, report) = status_report(config, workspace, false)?;
let installed = report.record.as_ref().and_then(|r| r.bundle.as_ref()).is_some();
if !installed {
    eprintln!("no bundle installed; nothing to remove");
    return Ok(());
}

Prevention

When it happens

Trigger: Calling `DshIntegrationCommand::RemoveBundle` when `status_report` returns a report with `record == None` or `record.bundle == None` — no bundle was ever installed, or the record was recreated without bundle info.

Common situations: Running `remove-bundle` twice (idempotency mistake); running it on a fresh workspace where connect happened but install-bundle never did; a stale/corrupted record that lost the bundle field.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at crates/tui/src/integrations/cli.rs:480

                "installed: {} {} into {} (patch sha256 {})",
                bundle.package_name,
                bundle.package_version,
                bundle.profile_dir.display(),
                bundle.patch_sha256
            );
            println!(
                "launch without --patch: dsh --profile {}  (or `{CLI_COMMAND} launch`)",
                dsh::bundle::BUNDLE_PROFILE
            );
            Ok(())
        }
        DshIntegrationCommand::RemoveBundle { yes } => {
            let (paths, report) = status_report(config, workspace, false)?;
            let bundle = report
                .record
                .as_ref()
                .and_then(|r| r.bundle.as_ref())
                .ok_or_else(|| anyhow::anyhow!("no bundle is installed"))?;
            println!(
                "remove-bundle will run: dsh plugin --profile {} remove {}",
                bundle.profile, bundle.package_name
            );
            println!("  then delete only {}", paths.bundle_dir.display());
            println!(
                "  the DSH profile dir {} and its app bundle link stay in place (DSH-owned)",
                bundle.profile_dir.display()
            );
            confirm(
                yes,
                "Remove the Codewhale bundle from DSH profile `codewhale`?",
            )?;
            let removed = dsh::remove_bundle(&paths, &report.detection, &dsh::ProcessRunner)?;
            println!(
                "removed bundle; deleted {} Codewhale-owned file(s)",
                removed.len()
            );

View on GitHub (pinned to 73e0f67d83)