1
0
Fork 0

Propagate build errors in xtask bundle

This commit is contained in:
Robbert van der Helm 2022-02-02 15:00:02 +01:00
parent 048d69213e
commit 69db1acce8

View file

@ -45,13 +45,16 @@ fn bundle(target: &str, mut args: Vec<String>) -> Result<()> {
} }
} }
Command::new("cargo") let status = Command::new("cargo")
.arg("build") .arg("build")
.arg("-p") .arg("-p")
.arg(target) .arg(target)
.args(args) .args(args)
.status() .status()
.context(format!("Could not build {target}"))?; .context(format!("Could not call cargo to build {target}"))?;
if !status.success() {
bail!("Could not build {}", target);
}
let lib_path = Path::new("target") let lib_path = Path::new("target")
.join(if is_release_build { "release" } else { "debug" }) .join(if is_release_build { "release" } else { "debug" })