@@ -57,16 +57,16 @@ func (s *PHPStore) doDiscover() {
5757 // XAMPP
5858 s .addFromDir ("/opt/lampp" , nil , "XAMPP" )
5959
60- if runtime .GOOS == "darwin" {
61- // homebrew
62- if out , err := exec .Command ("brew" , "--cellar" ).Output (); err == nil {
63- prefix := strings .Trim (string (out ), "\n " )
64- // pattern example: php@5.6/5.6.33_9
65- s .discoverFromDir (prefix , nil , regexp .MustCompile ("^php@(?:[\\ d\\ .]+)/(?:[\\ d\\ ._]+)$" ), "homebrew" )
66- // pattern example: php/7.2.11
67- s .discoverFromDir (prefix , nil , regexp .MustCompile ("^php/(?:[\\ d\\ ._]+)$" ), "homebrew" )
68- }
60+ // homebrew
61+ if out , err := exec .Command ("brew" , "--cellar" ).Output (); err == nil {
62+ prefix := strings .Trim (string (out ), "\n " )
63+ // pattern example: php@5.6/5.6.33_9
64+ s .discoverFromDir (prefix , nil , regexp .MustCompile ("^php@(?:[\\ d\\ .]+)/(?:[\\ d\\ ._]+)$" ), "homebrew" )
65+ // pattern example: php/7.2.11
66+ s .discoverFromDir (prefix , nil , regexp .MustCompile ("^php/(?:[\\ d\\ ._]+)$" ), "homebrew" )
67+ }
6968
69+ if runtime .GOOS == "darwin" {
7070 // Liip PHP https://php-osx.liip.ch/ (pattern example: php5-7.2.0RC1-20170907-205032/bin/php)
7171 s .discoverFromDir ("/usr/local" , nil , regexp .MustCompile ("^php5\\ -[\\ d\\ .]+(?:RC|BETA)?\\ d*\\ -\\ d+\\ -\\ d+$" ), "Liip PHP" )
7272
0 commit comments