From e046fff6f6ac61e01db03192dd46d6da396024e0 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Sat, 30 Nov 2019 16:31:18 -0500 Subject: [PATCH] Display nginx config errors on start While since #268 valet has been checking nginx configs for errors when starting/restarting, the captured errors are never displayed if there is a failure because it's being run using `quietly()`. This PR causes the errors to pass through to the console so we can more readily understand why nginx may not be starting or not serving properly. --- cli/Valet/Nginx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/Valet/Nginx.php b/cli/Valet/Nginx.php index dda65cd3e..9823d88b1 100644 --- a/cli/Valet/Nginx.php +++ b/cli/Valet/Nginx.php @@ -115,7 +115,7 @@ function installNginxDirectory() */ private function lint() { - $this->cli->quietly( + $this->cli->run( 'sudo nginx -c '.static::NGINX_CONF.' -t', function ($exitCode, $outputMessage) { throw new DomainException("Nginx cannot start, please check your nginx.conf [$exitCode: $outputMessage].");