mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Show install, start, stop and restart log info
This commit is contained in:
@@ -91,6 +91,8 @@ function ensureInstalled($formula, $options = [], $taps = [])
|
||||
*/
|
||||
function installOrFail($formula, $options = [], $taps = [])
|
||||
{
|
||||
info("Installing $formula...");
|
||||
|
||||
if (count($taps) > 0) {
|
||||
$this->tap($taps);
|
||||
}
|
||||
@@ -129,8 +131,12 @@ function restartService($services)
|
||||
$services = is_array($services) ? $services : func_get_args();
|
||||
|
||||
foreach ($services as $service) {
|
||||
$this->cli->quietly('sudo brew services stop '.$service);
|
||||
$this->cli->quietly('sudo brew services start '.$service);
|
||||
if ($this->installed($service)) {
|
||||
info("Restarting $service...");
|
||||
|
||||
$this->cli->quietly('sudo brew services stop '.$service);
|
||||
$this->cli->quietly('sudo brew services start '.$service);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,7 +150,11 @@ function stopService($services)
|
||||
$services = is_array($services) ? $services : func_get_args();
|
||||
|
||||
foreach ($services as $service) {
|
||||
$this->cli->quietly('sudo brew services stop '.$service);
|
||||
if ($this->installed($service)) {
|
||||
info("Stopping $service...");
|
||||
|
||||
$this->cli->quietly('sudo brew services stop '.$service);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user