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<()> {
|
||||
eprintln!("running orcx {}", subcommand.join(" "));
|
||||
let status = Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?;
|
||||
if status.success() {
|
||||
if !Command::new("cargo").args(["build", "-p", "orchid-std"]).status()?.success() {
|
||||
EXIT_OK.store(false, Ordering::Relaxed);
|
||||
return Ok(());
|
||||
}
|
||||
let status = Command::new("cargo")
|
||||
.args(["run", "-p", "orcx", "--"].into_iter().chain(subcommand.iter().map(|s| s.as_str())))
|
||||
.status()?;
|
||||
EXIT_OK.store(status.success(), Ordering::Relaxed);
|
||||
} else {
|
||||
EXIT_OK.store(false, Ordering::Relaxed);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user