1
0
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:
Antonio Carlos Ribeiro
2017-02-21 12:04:45 -03:00
parent 2e0e2c1fa4
commit 6f8c14271a
4 changed files with 23 additions and 3 deletions

View File

@@ -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);
}
}
}