1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 09:10:03 +01:00

Clean up NullWriter; drop legacy config check

This commit is contained in:
Matt Stauffer
2022-12-22 00:27:09 -05:00
parent a77030ab08
commit e19afe51ad
6 changed files with 15 additions and 34 deletions

View File

@@ -49,14 +49,6 @@ public function uninstall(): void
public function createConfigurationDirectory(): void
{
$this->files->ensureDirExists(preg_replace('~/valet$~', '', VALET_HOME_PATH), user());
$oldPath = posix_getpwuid(fileowner(__FILE__))['dir'].'/.valet';
if ($this->files->isDir($oldPath)) {
rename($oldPath, VALET_HOME_PATH);
$this->prependPath(VALET_HOME_PATH.'/Sites');
}
$this->files->ensureDirExists(VALET_HOME_PATH, user());
}

View File

@@ -18,25 +18,12 @@ public function __construct(public Filesystem $files)
*/
public function onEveryRun(): void
{
$this->relocateOldConfig();
$this->pruneMissingDirectories();
$this->pruneSymbolicLinks();
$this->fixOldSampleValetDriver();
$this->errorIfOldCustomDrivers();
}
/**
* Relocate config dir to ~/.config/valet/ if found in old location.
*
* @return void
*/
public function relocateOldConfig()
{
if (is_dir(VALET_LEGACY_HOME_PATH) && ! is_dir(VALET_HOME_PATH)) {
Configuration::createConfigurationDirectory();
}
}
/**
* Prune all non-existent paths from the configuration.
*