We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a50c0c commit 7b16e59Copy full SHA for 7b16e59
tests/testsuite/metadata.rs
@@ -1754,6 +1754,30 @@ Caused by:
1754
.run();
1755
}
1756
1757
+#[cargo_test]
1758
+fn cargo_metadata_with_invalid_publish_field() {
1759
+ let p = project()
1760
+ .file("src/foo.rs", "")
1761
+ .file(
1762
+ "Cargo.toml",
1763
+ r#"
1764
+ [package]
1765
+ publish = "foo"
1766
+ "#,
1767
+ )
1768
+ .build();
1769
+
1770
+ p.cargo("metadata")
1771
+ .with_status(101)
1772
+ .with_stderr(
1773
+ r#"[ERROR] failed to parse manifest at `[..]`
1774
1775
+Caused by:
1776
+ invalid type: string "foo", expected a boolean or vector of strings for key `package.publish`"#,
1777
1778
+ .run();
1779
+}
1780
1781
const MANIFEST_OUTPUT: &str = r#"
1782
{
1783
"packages": [{
0 commit comments