pbakaus/impeccable · error

{e} (dynamic error string from bundle::resolve_link_source)

Error message

{e} (dynamic error string from bundle::resolve_link_source)

What it means

The `link` command resolves the source checkout to link skills from via `bundle::resolve_link_source`. When that fails (e.g. the checkout root or bundle directory cannot be located), the error message is printed and the process exits with code 1. It indicates the command could not determine a valid source to link from.

Source

Thrown at crates/skills/src/commands.rs:463

    hook_manifest::set_hook_consent(root, if accepted { "accepted" } else { "declined" }).map_err(Flow::Throw)?;
    Ok(accepted)
}

// ─── link ────────────────────────────────────────────────────────────────────

/// JS: link(flags)
fn link(flags: &[String], io: &mut Io) -> R<()> {
    let (sys, mut prompt) = ctx(io);
    let force = has_flag(flags, "--force");
    let yes = has_flag(flags, "-y") || has_flag(flags, "--yes");
    let source_value = get_flag_value(flags, "--source");
    let providers_value = get_flag_value(flags, "--providers");
    let root = sys.find_project_root();

    let source = match bundle::resolve_link_source(source_value, &root) {
        Ok(s) => s,
        Err(e) => {
            err(io, &e);
            return Err(Flow::Exit(1));
        }
    };
    let targets = sys.resolve_install_targets(&root, providers_value);
    if targets.is_empty() {
        err(io, "Could not determine a target harness folder.");
        err(io, "Pass one explicitly, e.g. --providers=claude,cursor");
        return Err(Flow::Exit(1));
    }
    if !yes {
        out(io, &format!("Source checkout: {}", source.checkout_root));
        out(io, &format!("Target harness folder(s): {}", targets.join(", ")));
        let ans = prompt.ask(io, &format!("Link impeccable skills into {} folder(s)? (Y/n) ", targets.len()))?;
        if ans == "n" || ans == "no" {
            out(io, "Aborted. Re-run with --providers=<names> to choose explicitly (e.g. --providers=claude,cursor).");
            return Err(Flow::Exit(0));
        }
    }

View on GitHub (pinned to 2bc2879276)

Solutions

  1. Run `bun run build` in the source checkout to produce the bundle artifacts
  2. Run the link command from the repository root of the checkout
  3. Pass an explicit source path if supported and verify it exists

Example fix

// before
impeccable link  # run from ~/somewhere
// after
cd ~/code/impeccable && bun run build && impeccable link
Defensive patterns

Strategy: validation

Validate before calling

if !fs.existsSync(path.join(checkoutRoot, 'dist')) { console.error('Bundle missing; run `bun run build` before linking.'); process.exit(1); }

Try / catch

try { await link(); } catch (e) { if (/resolve_link_source|bundle/.test(String(e))) { console.error('Source checkout not found; run from repo root and build first.'); } throw e; }

Prevention

When it happens

Trigger: Running `impeccable link` outside a project root, or from a checkout missing the built bundle directory (e.g. `dist/` never built).

Common situations: Developers cloning the repo without running the build first, or invoking the CLI from a random directory with no discoverable project root.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08). Data as JSON: /api/errors/f667f03f7bf9b314. Report an issue: GitHub.