ramensoftware/windhawk · info
data import would (with --yes):
Error message
data import would (with --yes):
What it means
This is a dry-run banner printed by `data import` when `--yes` is absent: 'data import would (with --yes):'. It is not an exception — the import deliberately stops after showing the plan so the user can confirm before anything is written.
Solutions
- Add `--yes` to the command to actually perform the import
- Review the printed plan to confirm the mods/settings that will be applied
- For automation, pass `--yes` (after validating the archive) to avoid interactive gating
Example fix
// before windhawk data import backup.whc // after windhawk data import backup.whc --yes
Defensive patterns
Strategy: validation
Validate before calling
if !args.yes { eprintln!("dry-run only; pass --yes to apply"); } Try / catch
// no exception to catch: detect the dry-run banner in output
if output.contains("data import would (with --yes):") {
eprintln!("import did not run; re-run with --yes");
} Prevention
- Always pass --yes in scripts/non-interactive contexts
- Review dry-run output once before automating with --yes
When it happens
Trigger: Running `windhawk data import <archive>` without the `--yes` flag; the CLI prints the plan header and then each planned action, then exits without importing.
Common situations: First-time imports where users inspect what will change; CI scripts that forgot `--yes` and stall or no-op.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- - apply the archived Windhawk app settings
- Failed
- Failed to load metadata for mod
- {}: {}
- Compiler warnings
AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12).
Data as JSON: /api/errors/556d00acf1c74d78.
Report an issue: GitHub.
Appendix: source
Thrown at src/windhawk-core/cli/src/commands/data.rs:200
match scope {
ModScope::Ids { ids } => ids.iter().cloned().collect(),
ModScope::Keyword(ModScopeKeyword::None) => BTreeSet::new(),
ModScope::Keyword(ModScopeKeyword::AllExceptLocal) => {
all().filter(|id| !is_local_id(id)).collect()
}
ModScope::Keyword(ModScopeKeyword::All) => all().collect(),
}
}
/// Print the planned import actions to stderr, so a run without `--yes` shows
/// what it would do before refusing (exit 2).
fn print_import_plan(
env: &Environment,
manifest: &UserDataManifest,
selection: &UserDataSelection,
) {
let scope = import_scope_ids(manifest, &selection.mods);
env.logger.warn("data import would (with --yes):");
if selection.app_settings && manifest.has_app_settings {
env.logger
.warn(" - apply the archived Windhawk app settings");
}
env.logger
.warn(&format!(" - import {} mod(s):", scope.len()));
for m in &manifest.mods {
if scope.contains(&m.mod_id) {
env.logger
.warn(&format!(" {} {}", m.mod_id, m.version));
}
}
}
/// Render a core import-progress event on stderr (via the logger, so `--quiet`
/// suppresses the informational lines but keeps failure warnings). A stamped
/// `compileTarget` event names the mod being compiled; the per-mod
/// `ImportProgress` markers report the start and terminal outcome of each mod.View on GitHub (pinned to 61d99ed8e1)