Only run "valet install" if valet was updated (#315)
This commit is contained in:
@@ -29,6 +29,7 @@ pub enum Step {
|
|||||||
Emacs,
|
Emacs,
|
||||||
Gem,
|
Gem,
|
||||||
Node,
|
Node,
|
||||||
|
Composer,
|
||||||
Sdkman,
|
Sdkman,
|
||||||
Remotes,
|
Remotes,
|
||||||
Rustup,
|
Rustup,
|
||||||
|
|||||||
@@ -306,9 +306,12 @@ fn run() -> Result<()> {
|
|||||||
|
|
||||||
if config.should_run(Step::Node) {
|
if config.should_run(Step::Node) {
|
||||||
runner.execute("NPM", || node::run_npm_upgrade(&base_dirs, run_type))?;
|
runner.execute("NPM", || node::run_npm_upgrade(&base_dirs, run_type))?;
|
||||||
runner.execute("composer", || generic::run_composer_update(&base_dirs, run_type))?;
|
|
||||||
runner.execute("yarn", || node::yarn_global_update(run_type))?;
|
runner.execute("yarn", || node::yarn_global_update(run_type))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.should_run(Step::Composer) {
|
||||||
|
runner.execute("composer", || generic::run_composer_update(&base_dirs, run_type))?;
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
|
|||||||
@@ -187,10 +187,11 @@ pub fn run_composer_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()
|
|||||||
|
|
||||||
print_separator("Composer");
|
print_separator("Composer");
|
||||||
|
|
||||||
run_type.execute(&composer).args(&["global", "update"]).check_run()?;
|
let output = Command::new(&composer).args(&["global", "update"]).check_output()?;
|
||||||
|
if output.contains("valet") {
|
||||||
if let Some(valet) = utils::which("valet") {
|
if let Some(valet) = utils::which("valet") {
|
||||||
run_type.execute(&valet).arg("install").check_run()?;
|
run_type.execute(&valet).arg("install").check_run()?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user