Only run "valet install" if valet was updated (#315)

This commit is contained in:
Morten Scheel
2020-02-10 21:10:06 +01:00
committed by GitHub
parent d72a17b1dc
commit c3b8449eb7
3 changed files with 10 additions and 5 deletions

View File

@@ -187,10 +187,11 @@ pub fn run_composer_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()
print_separator("Composer");
run_type.execute(&composer).args(&["global", "update"]).check_run()?;
if let Some(valet) = utils::which("valet") {
run_type.execute(&valet).arg("install").check_run()?;
let output = Command::new(&composer).args(&["global", "update"]).check_output()?;
if output.contains("valet") {
if let Some(valet) = utils::which("valet") {
run_type.execute(&valet).arg("install").check_run()?;
}
}
Ok(())