File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 495495 */
496496 $ app ->command ('use [phpVersion] [--force] ' , function ($ phpVersion , $ force ) {
497497 if (!$ phpVersion ) {
498- if (file_exists ($ path = getcwd () . '/.valetrc ' )) {
499- if ($ phpVersion = trim (file_get_contents ($ path ))) {
500- info ('Found \'' . $ path . '/.valetrc \' with version < ' . $ phpVersion . '> ' );
501- } else {
502- return info ('.valetrc does not contain a valid PHP version ' . $ phpVersion );
503- }
504- } else {
505- return info ('Valet is using ' . Brew::linkedPhp ());
498+ $ path = getcwd () . '/.valetrc ' ;
499+ $ linkedVersion = Brew::linkedPhp ();
500+ if (!file_exists ($ path )) {
501+ return info (sprintf ('Valet is using %s. ' , $ linkedVersion ));
502+ }
503+
504+ $ phpVersion = trim (file_get_contents ($ path ));
505+ info ('Found \'' . $ path . '\' with version: ' . $ phpVersion );
506+
507+ if ($ linkedVersion == $ phpVersion ) {
508+ return info (sprintf ('Valet is already using %s. ' , $ linkedVersion ));
506509 }
507510 }
508511
You can’t perform that action at this time.
0 commit comments