forked from Orchid/orchid
slight job control tweak
This commit is contained in:
@@ -6,14 +6,13 @@ use crate::{Args, EXIT_OK};
|
|||||||
|
|
||||||
pub fn orcx(_args: &Args, subcommand: &[String]) -> io::Result<()> {
|
pub fn orcx(_args: &Args, subcommand: &[String]) -> io::Result<()> {
|
||||||
eprintln!("running orcx {}", subcommand.join(" "));
|
eprintln!("running orcx {}", subcommand.join(" "));
|
||||||
let status = Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?;
|
if !Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?.success() {
|
||||||
if status.success() {
|
EXIT_OK.store(false, Ordering::Relaxed);
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
let status = Command::new("cargo")
|
let status = Command::new("cargo")
|
||||||
.args(["run", "-p", "orcx", "--"].into_iter().chain(subcommand.iter().map(|s| s.as_str())))
|
.args(["run", "-p", "orcx", "--"].into_iter().chain(subcommand.iter().map(|s| s.as_str())))
|
||||||
.status()?;
|
.status()?;
|
||||||
EXIT_OK.store(status.success(), Ordering::Relaxed);
|
EXIT_OK.store(status.success(), Ordering::Relaxed);
|
||||||
} else {
|
|
||||||
EXIT_OK.store(false, Ordering::Relaxed);
|
|
||||||
}
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user