Skip to content

Commit 1a86b76

Browse files
committed
fix(cli): Ensure we don't accidentally let embedded manifests on stable
There should be a later check when parsing but just in case, let's have a check here as well.
1 parent 7b5fe7b commit 1a86b76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/cargo/util/command_prelude.rs

+7
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,13 @@ pub fn root_manifest(manifest_path: Option<&Path>, config: &Config) -> CargoResu
790790
if !path.exists() {
791791
anyhow::bail!("manifest path `{}` does not exist", manifest_path.display())
792792
}
793+
if crate::util::toml::is_embedded(&path) && !config.cli_unstable().script {
794+
return Err(anyhow::anyhow!(
795+
"embedded manifest `{}` requires `-Zscript`",
796+
path.display()
797+
)
798+
.into());
799+
}
793800
Ok(path)
794801
} else {
795802
find_root_manifest_for_wd(config.cwd())

0 commit comments

Comments
 (0)