@@ -57,16 +57,16 @@ func (s *PHPStore) doDiscover() {
57
57
// XAMPP
58
58
s .addFromDir ("/opt/lampp" , nil , "XAMPP" )
59
59
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
+ }
69
68
69
+ if runtime .GOOS == "darwin" {
70
70
// Liip PHP https://php-osx.liip.ch/ (pattern example: php5-7.2.0RC1-20170907-205032/bin/php)
71
71
s .discoverFromDir ("/usr/local" , nil , regexp .MustCompile ("^php5\\ -[\\ d\\ .]+(?:RC|BETA)?\\ d*\\ -\\ d+\\ -\\ d+$" ), "Liip PHP" )
72
72
0 commit comments