We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58992b6 commit 91423b2Copy full SHA for 91423b2
1 file changed
crates/cargo-rustapi/src/commands/generate.rs
@@ -218,6 +218,11 @@ async fn ensure_crud_dependencies() -> Result<()> {
218
}
219
220
let mut content = fs::read_to_string(cargo_path).await?;
221
+ if !content.contains("[package]") {
222
+ anyhow::bail!(
223
+ "Cargo.toml has no [package] section — run `cargo rustapi generate crud` from an application project root, not the workspace root"
224
+ );
225
+ }
226
let mut deps_to_add = Vec::new();
227
228
if !content
0 commit comments