{"record":{"id":"9c0b7445241c7908","repo":"clockworklabs/SpacetimeDB","slug":"aborted","errorCode":null,"errorMessage":"Aborted.","messagePattern":"Aborted\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"crates/cli/src/subcommands/dev.rs","lineNumber":728,"sourceCode":"                database_sources\n                    .get((*db).as_str())\n                    .is_some_and(|src| src.as_deref() == Some(\"spacetime.json\"))\n            })\n            .cloned()\n            .collect();\n\n        if !databases_from_main_config.is_empty() && !force {\n            eprintln!(\n                \"{} Database(s) `{}` are defined in spacetime.json (usually reserved for production databases).\",\n                \"Warning:\".yellow().bold(),\n                databases_from_main_config.join(\", \")\n            );\n            let should_continue = Confirm::new()\n                .with_prompt(\"Do you want to proceed with publishing in dev mode?\")\n                .default(true)\n                .interact()?;\n            if !should_continue {\n                anyhow::bail!(\"Aborted.\");\n            }\n        }\n    }\n\n    if let Some(ref cmd) = client_command {\n        println!(\"Client command: {}\", cmd.cyan());\n    }\n    println!(\"{}\", \"Press Ctrl+C to stop\".dimmed());\n    println!();\n    let loaded_config_dir = loaded_config.as_ref().map(|lc| lc.config_dir.clone());\n\n    generate_build_and_publish(\n        &config,\n        &project_dir,\n        loaded_config_dir.as_deref(),\n        &spacetimedb_dir,\n        &module_bindings_dir,\n        client_language,","sourceCodeStart":710,"sourceCodeEnd":746,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/subcommands/dev.rs#L710-L746","documentation":"A deliberate user abort: `spacetime dev` warns that the database(s) being published are also defined in the main `spacetime.json` (typically production databases), asks `Do you want to proceed with publishing in dev mode?`, and bails with `Aborted.` when the answer is no (or when `--force` was not passed and the prompt defaults were not accepted). It is a safety confirmation, not a malfunction.","triggerScenarios":"Running `spacetime dev` where dev publish targets reference databases also declared in the main config, and answering 'no' at the confirmation (or running non-interactively with the prompt resolving to no).","commonSituations":"Pointing a dev environment at the same database names as production config; running dev mode in CI where the interactive Confirm cannot be answered; sharing one spacetime.json between prod deploys and local dev.","solutions":["Answer `y` at the prompt if overwriting those databases in dev mode is intended","Better: use distinct dev database names in the dev publish targets so the warning never fires","Pass `--force` to skip the confirmation in scripts that intentionally target those databases","Split production and dev into separate config files/projects"],"exampleFix":"# before\nspacetime dev  # same db names as prod config, answered 'n'\n# after\nspacetime dev --database mydb-dev","handlingStrategy":"validation","validationCode":"# Separate dev db names from prod-configured ones\njq '.publish[].database' spacetime.json  # ensure none match main-config databases before dev","typeGuard":null,"tryCatchPattern":"// If scripting the prompt non-interactively, either pass --force deliberately or expect the abort and exit 0 on 'Aborted.' when the operator declined.","preventionTips":["Use dev-suffixed database names in dev targets","Pass --force only in automation that intends to overwrite"],"tags":["cli","confirmation","dev-workflow","spacetimedb"],"backgroundTag":"user-aborted-operation","analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}