1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Better handle new installations

This commit is contained in:
Matt Stauffer
2022-12-23 13:24:58 -05:00
parent 25f91e46f3
commit 8006649fa4
2 changed files with 8 additions and 0 deletions

View File

@@ -346,6 +346,10 @@ public function unlink(string $name): string
*/
public function pruneLinks(): void
{
if (! $this->files->isDir(VALET_HOME_PATH)) {
return;
}
$this->files->ensureDirExists($this->sitesPath(), user());
$this->files->removeBrokenLinksAt($this->sitesPath());

View File

@@ -73,6 +73,10 @@ public function errorIfOldCustomDrivers(): void
{
$driversPath = VALET_HOME_PATH.'/Drivers';
if (!$this->files->isDir($driversPath)) {
return;
}
foreach ($this->files->scanDir($driversPath) as $driver) {
if (! str_contains($this->files->get($driversPath.'/'.$driver), 'namespace')) {
warning('Please make sure all custom drivers have been upgraded for Valet 4.');