diff --git a/packages/cli/src/cli/create.rs b/packages/cli/src/cli/create.rs index 387bbf9d1..eae08d427 100644 --- a/packages/cli/src/cli/create.rs +++ b/packages/cli/src/cli/create.rs @@ -81,7 +81,7 @@ impl Create { }; restore_cursor_on_sigint(); let path = cargo_generate::generate(args)?; - post_create(&path)?; + _ = post_create(&path); Ok(StructuredOutput::Success) } } @@ -183,7 +183,10 @@ pub(crate) fn post_create(path: &Path) -> Result<()> { // 3. Format the `Cargo.toml` and `Dioxus.toml` files. let toml_paths = [path.join("Cargo.toml"), path.join("Dioxus.toml")]; for toml_path in &toml_paths { - let toml = std::fs::read_to_string(toml_path)?; + let Ok(toml) = std::fs::read_to_string(toml_path) else { + continue; + }; + let mut toml = toml.parse::().map_err(|e| { anyhow::anyhow!( "failed to parse toml at {}: {}", diff --git a/packages/cli/src/cli/init.rs b/packages/cli/src/cli/init.rs index 0eb5e9c86..46c55ef96 100644 --- a/packages/cli/src/cli/init.rs +++ b/packages/cli/src/cli/init.rs @@ -73,7 +73,7 @@ impl Init { }; create::restore_cursor_on_sigint(); let path = cargo_generate::generate(args)?; - create::post_create(&path)?; + _ = create::post_create(&path); Ok(StructuredOutput::Success) } }