@@ -51,7 +51,7 @@ func (s *PHPStore) doDiscover() {
51
51
52
52
// phpenv
53
53
if homeDir != "" {
54
- s .discoverFromDir (filepath .Join (homeDir , ".phpenv" , "versions" ), nil , regexp .MustCompile (" ^[\\ d \\ .]+(?:RC|BETA|snapshot)?$" ), "phpenv" )
54
+ s .discoverFromDir (filepath .Join (homeDir , ".phpenv" , "versions" ), nil , regexp .MustCompile (` ^[\d\ .]+(?:RC|BETA|snapshot)?$` ), "phpenv" )
55
55
}
56
56
57
57
// XAMPP
@@ -61,28 +61,28 @@ func (s *PHPStore) doDiscover() {
61
61
if out , err := exec .Command ("brew" , "--cellar" ).Output (); err == nil {
62
62
prefix := strings .Trim (string (out ), "\n " )
63
63
// pattern example: [email protected] /5.6.33_9
64
- s .discoverFromDir (prefix , nil , regexp .MustCompile (" ^php@(?:[\\ d \\ .]+)/(?:[\\ d \\ ._]+)$" ), "homebrew" )
64
+ s .discoverFromDir (prefix , nil , regexp .MustCompile (` ^php@(?:[\d\ .]+)/(?:[\d\ ._]+)$` ), "homebrew" )
65
65
// pattern example: php/7.2.11
66
- s .discoverFromDir (prefix , nil , regexp .MustCompile (" ^php/(?:[\\ d \\ ._]+)$" ), "homebrew" )
66
+ s .discoverFromDir (prefix , nil , regexp .MustCompile (` ^php/(?:[\d\ ._]+)$` ), "homebrew" )
67
67
}
68
68
69
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
- s .discoverFromDir ("/usr/local" , nil , regexp .MustCompile (" ^php5\\ -[\\ d \\ .]+(?:RC|BETA)?\\ d*\\ - \\ d+\\ - \\ d+$" ), "Liip PHP" )
71
+ s .discoverFromDir ("/usr/local" , nil , regexp .MustCompile (` ^php5\-[\d\ .]+(?:RC|BETA)?\d*\-\ d+\-\ d+$` ), "Liip PHP" )
72
72
73
73
// MAMP
74
- s .discoverFromDir ("/Applications/MAMP/bin/php/" , nil , regexp .MustCompile (" ^php[\\ d \\ .]+(?:RC|BETA)?$" ), "MAMP" )
74
+ s .discoverFromDir ("/Applications/MAMP/bin/php/" , nil , regexp .MustCompile (` ^php[\d\ .]+(?:RC|BETA)?$` ), "MAMP" )
75
75
76
76
// MacPorts (/opt/local/sbin/php-fpm71, /opt/local/bin/php71)
77
- s .discoverFromDir ("/opt/local" , regexp .MustCompile (" ^php(?:[\\ d \\ .]+)$" ), nil , "MacPorts" )
77
+ s .discoverFromDir ("/opt/local" , regexp .MustCompile (` ^php(?:[\d\ .]+)$` ), nil , "MacPorts" )
78
78
}
79
79
80
80
if runtime .GOOS == "linux" {
81
81
// Ondrej PPA on Linux (bin/php7.2)
82
- s .discoverFromDir ("/usr" , regexp .MustCompile (" ^php(?:[\\ d \\ .]+)$" ), nil , "Ondrej PPA" )
82
+ s .discoverFromDir ("/usr" , regexp .MustCompile (` ^php(?:[\d\ .]+)$` ), nil , "Ondrej PPA" )
83
83
84
84
// Remi's RPM repository
85
- s .discoverFromDir ("/opt/remi" , nil , regexp .MustCompile (" ^php(?:\\ d+)/root/usr$" ), "Remi's RPM" )
85
+ s .discoverFromDir ("/opt/remi" , nil , regexp .MustCompile (` ^php(?:\d+)/root/usr$` ), "Remi's RPM" )
86
86
}
87
87
88
88
// asdf-vm
0 commit comments