{"record":{"id":"92cce09271b20abf","repo":"Hmbown/CodeWhale","slug":"import-cancelled-no-configuration-was-changed","errorCode":null,"errorMessage":"import cancelled; no configuration was changed","messagePattern":"import cancelled; no configuration was changed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"crates/cli/src/config_bundles.rs","lineNumber":1444,"sourceCode":"    }\n    if !std::io::stdin().is_terminal() {\n        bail!(\n            \"import refused: non-interactive use requires explicit --yes after reviewing the plan\"\n        );\n    }\n    print!(\n        \"Apply this bundle ({} added, {} changed)? Type 'yes': \",\n        plan.added.len(),\n        plan.changed.len()\n    );\n    use std::io::Write;\n    std::io::stdout().flush()?;\n    let mut answer = String::new();\n    std::io::stdin()\n        .read_line(&mut answer)\n        .context(\"reading import consent\")?;\n    if answer.trim() != \"yes\" {\n        bail!(\"import cancelled; no configuration was changed\");\n    }\n    Ok(())\n}\n\n// ---------------------------------------------------------------------------\n// CLI surface\n// ---------------------------------------------------------------------------\n\n/// Arguments for `codewhale config import`.\n#[derive(Debug, clap::Args)]\npub struct ImportArgs {\n    /// Bundle source: a file path, an HTTPS URL, or `-` for stdin.\n    pub source: String,\n    /// Print the deterministic import plan without writing anything.\n    #[arg(long, default_value_t = false)]\n    dry_run: bool,\n    /// Skip the interactive consent prompt (required for headless use).\n    #[arg(long, default_value_t = false)]","sourceCodeStart":1426,"sourceCodeEnd":1462,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/config_bundles.rs#L1426-L1462","documentation":"require_import_consent prompts 'Type yes:' on a terminal and bails when the typed answer (trimmed) is anything other than 'yes'. This is the user-declined path: nothing was applied, so the error states no configuration was changed.","triggerScenarios":"Answering the interactive import confirmation with anything except the literal 'yes' (e.g. 'y', 'Y', Enter, 'no'), causing require_import_consent to bail before apply_bundle writes.","commonSituations":"Users typing 'y' out of habit at the confirmation prompt; accidentally pressing Enter to dismiss; pasting a command where stdin carries a non-'yes' first line.","solutions":["Re-run the import and type exactly `yes` (lowercase, full word) when prompted.","For scripts, pass `--yes` instead of piping an answer into stdin.","Review the printed plan (added/changed counts) first if the decline was intentional, then re-run when ready."],"exampleFix":"Apply this bundle (3 added, 1 changed)? Type 'yes': y\n// refused\nApply this bundle (3 added, 1 changed)? Type 'yes': yes\n// applied","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if let Err(e) = run_import(&args, &store) {\n    if e.to_string() == \"import cancelled; no configuration was changed\" {\n        eprintln!(\"declined by user; config untouched — re-run and type exactly 'yes'\");\n    }\n}","preventionTips":["Type the full word `yes` (lowercase) at the prompt; 'y' is not accepted.","Use --yes for automation instead of piping answers.","Note this error means nothing was written, so it is always safe to re-run."],"tags":["cli","config","import","user-consent","cancelled"],"backgroundTag":"operation-not-supported","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-22T06:17:15.046Z"}