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

Merge pull request #636 from drbyte/635-automove-old-config

Automatically move config after upgrade to v2.1
This commit is contained in:
Matt Stauffer
2018-09-19 22:00:33 -04:00
committed by GitHub
2 changed files with 9 additions and 0 deletions

View File

@@ -14,6 +14,8 @@
define('VALET_SERVER_PATH', realpath(__DIR__ . '/../../server.php'));
define('VALET_STATIC_PREFIX', '41c270e4-5535-4daa-b23e-c269744c2f45');
define('VALET_LEGACY_HOME_PATH', $_SERVER['HOME'].'/.valet');
/**
* Output the given text to the console.
*

View File

@@ -17,6 +17,13 @@
use function Valet\table;
use function Valet\warning;
/**
* Relocate config dir to ~/.config/valet/ if found in old location.
*/
if (is_dir(VALET_LEGACY_HOME_PATH) && !is_dir(VALET_HOME_PATH)) {
Configuration::createConfigurationDirectory();
}
/**
* Create the application.
*/