mirror of
https://github.com/laravel/valet.git
synced 2026-02-05 08:30:07 +01:00
Better handle new installations
This commit is contained in:
@@ -346,6 +346,10 @@ public function unlink(string $name): string
|
|||||||
*/
|
*/
|
||||||
public function pruneLinks(): void
|
public function pruneLinks(): void
|
||||||
{
|
{
|
||||||
|
if (! $this->files->isDir(VALET_HOME_PATH)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->files->ensureDirExists($this->sitesPath(), user());
|
$this->files->ensureDirExists($this->sitesPath(), user());
|
||||||
|
|
||||||
$this->files->removeBrokenLinksAt($this->sitesPath());
|
$this->files->removeBrokenLinksAt($this->sitesPath());
|
||||||
|
|||||||
@@ -73,6 +73,10 @@ public function errorIfOldCustomDrivers(): void
|
|||||||
{
|
{
|
||||||
$driversPath = VALET_HOME_PATH.'/Drivers';
|
$driversPath = VALET_HOME_PATH.'/Drivers';
|
||||||
|
|
||||||
|
if (!$this->files->isDir($driversPath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($this->files->scanDir($driversPath) as $driver) {
|
foreach ($this->files->scanDir($driversPath) as $driver) {
|
||||||
if (! str_contains($this->files->get($driversPath.'/'.$driver), 'namespace')) {
|
if (! str_contains($this->files->get($driversPath.'/'.$driver), 'namespace')) {
|
||||||
warning('Please make sure all custom drivers have been upgraded for Valet 4.');
|
warning('Please make sure all custom drivers have been upgraded for Valet 4.');
|
||||||
|
|||||||
Reference in New Issue
Block a user