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

Sanity check for tld config

In some cases of mixed older versions and configs, the 'tld' config entry was not set.
This now updates (sets) the `tld` config entry if it is not set.
This commit is contained in:
Chris Brown
2018-11-11 16:47:09 -05:00
committed by Matt Stauffer
parent 9c7a64efd6
commit 4ca3e0acb4

View File

@@ -63,13 +63,16 @@
*/
if (is_dir(VALET_HOME_PATH)) {
/**
* Get or set the TLD currently being used by Valet.
* Upgrade helper: ensure the tld config exists
*/
$app->command('tld [tld]', function ($tld = null) {
if (empty(Configuration::read()['tld'])) {
Configuration::writeBaseConfiguration();
}
/**
* Get or set the TLD currently being used by Valet.
*/
$app->command('tld [tld]', function ($tld = null) {
if ($tld === null) {
return info(Configuration::read()['tld']);
}