diff --git a/cli/Valet/Site.php b/cli/Valet/Site.php index 2ae6765..27dd0f2 100644 --- a/cli/Valet/Site.php +++ b/cli/Valet/Site.php @@ -640,9 +640,14 @@ public function createSigningRequest(string $url, string $keyPath, string $csrPa */ public function trustCa(string $caPemPath): void { - $this->cli->run(sprintf( - 'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "%s"', $caPemPath + info('Trusting Laravel Valet Certificate Authority...'); + $result = $this->cli->run(sprintf( + 'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "%s"', + $caPemPath )); + if ($result) { + throw new DomainException('The Certificate Authority must be trusted. Please run the command again.'); + } } /**