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:
committed by
Matt Stauffer
parent
9c7a64efd6
commit
4ca3e0acb4
@@ -62,14 +62,17 @@
|
||||
* Most commands are available only if valet is installed.
|
||||
*/
|
||||
if (is_dir(VALET_HOME_PATH)) {
|
||||
/**
|
||||
* Upgrade helper: ensure the tld config exists
|
||||
*/
|
||||
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 (empty(Configuration::read()['tld'])) {
|
||||
Configuration::writeBaseConfiguration();
|
||||
}
|
||||
|
||||
if ($tld === null) {
|
||||
return info(Configuration::read()['tld']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user