fix: use specifier target by default in init

This commit is contained in:
daimond113 2024-12-08 12:47:52 +01:00
parent 2b2d280fe0
commit 15af291f84
No known key found for this signature in database
GPG key ID: 3A8ECE51328B513C

View file

@ -179,7 +179,8 @@ impl InitCommand {
let field = &mut dev_deps[alias];
field["name"] = toml_edit::value(spec.name.to_string());
field["version"] = toml_edit::value(spec.version.to_string());
field["target"] = toml_edit::value(v_id.target().to_string());
field["target"] =
toml_edit::value(spec.target.unwrap_or_else(|| *v_id.target()).to_string());
}
} else {
println!(