|
@@ -81,7 +81,7 @@ impl Create {
|
|
};
|
|
};
|
|
restore_cursor_on_sigint();
|
|
restore_cursor_on_sigint();
|
|
let path = cargo_generate::generate(args)?;
|
|
let path = cargo_generate::generate(args)?;
|
|
- post_create(&path)?;
|
|
|
|
|
|
+ _ = post_create(&path);
|
|
Ok(StructuredOutput::Success)
|
|
Ok(StructuredOutput::Success)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -183,7 +183,10 @@ pub(crate) fn post_create(path: &Path) -> Result<()> {
|
|
// 3. Format the `Cargo.toml` and `Dioxus.toml` files.
|
|
// 3. Format the `Cargo.toml` and `Dioxus.toml` files.
|
|
let toml_paths = [path.join("Cargo.toml"), path.join("Dioxus.toml")];
|
|
let toml_paths = [path.join("Cargo.toml"), path.join("Dioxus.toml")];
|
|
for toml_path in &toml_paths {
|
|
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::<toml_edit::DocumentMut>().map_err(|e| {
|
|
let mut toml = toml.parse::<toml_edit::DocumentMut>().map_err(|e| {
|
|
anyhow::anyhow!(
|
|
anyhow::anyhow!(
|
|
"failed to parse toml at {}: {}",
|
|
"failed to parse toml at {}: {}",
|