Skip to content

Commit

Permalink
Merge pull request #1434 from mpociot/herd-patch
Browse files Browse the repository at this point in the history
Only delete DNSMasq resolver when Herd is not installed
  • Loading branch information
mattstauffer authored Aug 11, 2023
2 parents 4007d25 + 2320d15 commit 109c9d4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cli/Valet/DnsMasq.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 it if Herd is not installed.
if (!$this->files->exists('/Applications/Herd.app')) {
$tld = $this->configuration->read()['tld'];
$this->files->unlink($this->resolverPath . '/' . $tld);
}
}

/**
Expand Down

0 comments on commit 109c9d4

Please sign in to comment.