Skip to content

Commit 6e2f51b

Browse files
Kocaltucksaun
andauthored
Apply suggestion from @tucksaun
Co-authored-by: Tugdual Saunier <[email protected]>
1 parent aa1f7ac commit 6e2f51b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

discovery.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ import (
3636

3737
// discover tries to find all PHP versions on the current machine
3838
func (s *PHPStore) discover() {
39-
userHomeDir := userHomeDir()
40-
4139
s.doDiscover()
4240

43-
if userHomeDir != "" {
41+
if userHomeDir := userHomeDir(); userHomeDir != "" {
4442
// Herd-lite
4543
s.addFromDir(filepath.Join(userHomeDir, ".config", "herd-lite", "bin"), nil, "php.new (Herd-lite)")
4644
}

0 commit comments

Comments
 (0)