Fix cargo publish while I'm at it

This commit is contained in:
Gwilym Kuiper 2022-10-02 17:52:15 +01:00
parent 0c0e9e7165
commit b79fd9e22b

View file

@ -62,13 +62,12 @@ pub fn publish(matches: &ArgMatches) -> Result<(), Error> {
if *dry_run { if *dry_run {
println!("Would execute cargo publish for {publishable_crate}"); println!("Would execute cargo publish for {publishable_crate}");
} else { } else {
Command::new("cargo") assert!(Command::new("cargo")
.arg("publish") .arg("publish")
.current_dir(&root_directory.join(publishable_crate)) .current_dir(&root_directory.join(publishable_crate))
.spawn() .status()
.map_err(|_| Error::PublishCrate)? .map_err(|_| Error::PublishCrate)?
.wait() .success());
.map_err(|_| Error::PublishCrate)?;
} }
published_crates.insert(publishable_crate.to_string()); published_crates.insert(publishable_crate.to_string());