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

Refactor which-php command

This commit is contained in:
Matt Stauffer
2022-03-31 09:59:54 -04:00
parent 0045896d8e
commit 022923d247

View File

@@ -566,8 +566,9 @@
* Get the PHP executable path for a site.
*/
$app->command('which-php [site]', function ($site) {
$host = Site::host($site ?: getcwd()).'.'.Configuration::read()['tld'];
$phpVersion = Site::customPhpVersion($host);
$phpVersion = Site::customPhpVersion(
Site::host($site ?: getcwd()).'.'.Configuration::read()['tld']
);
if (! $phpVersion) {
$phpVersion = Site::phpRcVersion($site ?: basename(getcwd()));