Skip to content

Commit 7d0d9d9

Browse files
authored
Fix php-fpm on with Nix (#2)
1 parent 186a8ec commit 7d0d9d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discovery.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,13 @@ func (s *PHPStore) discoverPHPViaPHP(dir, binName string) *Version {
198198
FullVersion: v,
199199
PHPPath: php,
200200
}
201+
201202
fpm := filepath.Join(dir, "sbin", strings.Replace(binName, "php", "php-fpm", 1))
203+
204+
if _, err := os.Stat(fpm); os.IsNotExist(err) {
205+
fpm = filepath.Join(dir, "bin", strings.Replace(binName, "php", "php-fpm", 1))
206+
}
207+
202208
cgi := filepath.Join(dir, "bin", strings.Replace(binName, "php", "php-cgi", 1))
203209
phpconfig := filepath.Join(dir, "bin", strings.Replace(binName, "php", "php-config", 1))
204210
phpize := filepath.Join(dir, "bin", strings.Replace(binName, "php", "phpize", 1))

0 commit comments

Comments
 (0)