From 12172f4a5a5a871f83b5e215008f2a80f8299250 Mon Sep 17 00:00:00 2001 From: Matt Stauffer Date: Tue, 20 Dec 2022 16:09:38 -0500 Subject: [PATCH] Require passing a version number to isolate command --- cli/app.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cli/app.php b/cli/app.php index f47553c..a6a4e66 100644 --- a/cli/app.php +++ b/cli/app.php @@ -563,8 +563,14 @@ function (ConsoleCommandEvent $event) { $site = basename(getcwd()); } - if (is_null($phpVersion) && $phpVersion = Site::phpRcVersion($site)) { - info("Found '{$site}/.valetphprc' specifying version: {$phpVersion}"); + if (is_null($phpVersion)) { + if ($phpVersion = Site::phpRcVersion($site)) { + info("Found '{$site}/.valetphprc' specifying version: {$phpVersion}"); + } else { + info("\nPlease provide a version number. E.g.:"); + info("valet isolate php@8.2"); + exit; + } } PhpFpm::isolateDirectory($site, $phpVersion);