1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 16:50:09 +01:00

Only delete resolver when Herd is not installed

This commit is contained in:
Marcel Pociot
2023-07-26 15:54:51 +02:00
parent 4007d256fd
commit 0a33373bb6

View File

@@ -43,8 +43,13 @@ public function uninstall(): void
$this->brew->stopService('dnsmasq');
$this->brew->uninstallFormula('dnsmasq');
$this->cli->run('rm -rf '.BREW_PREFIX.'/etc/dnsmasq.d/dnsmasq-valet.conf');
$tld = $this->configuration->read()['tld'];
$this->files->unlink($this->resolverPath.'/'.$tld);
// As Laravel Herd uses the same DnsMasq resolver, we should only
// delete if, if Herd is not installed.
if (!$this->files->exists('/Applications/Herd.app')) {
$tld = $this->configuration->read()['tld'];
$this->files->unlink($this->resolverPath . '/' . $tld);
}
}
/**