1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

🐛 Be more lenient about Valet checks (#27)

This commit is contained in:
2021-03-31 12:21:06 +02:00
parent 7c884610b1
commit f7500637fe

View File

@ -38,8 +38,11 @@ class Startup {
) )
performEnvironmentCheck( performEnvironmentCheck(
// Older versions of Valet might be located in `/usr/local/bin` regardless of Homebrew prefix // Check for Valet; it can be symlinked or in .composer/vendor/bin
!(Shell.fileExists("/usr/local/bin/valet") || Shell.fileExists("/opt/homebrew/bin/valet")), !(Shell.fileExists("/usr/local/bin/valet")
|| Shell.fileExists("/opt/homebrew/bin/valet")
|| Shell.fileExists("~/.composer/vendor/bin/valet")
),
messageText: "startup.errors.valet_executable.title".localized, messageText: "startup.errors.valet_executable.title".localized,
informativeText: "startup.errors.valet_executable.desc".localized, informativeText: "startup.errors.valet_executable.desc".localized,
breaking: true breaking: true
@ -53,9 +56,11 @@ class Startup {
) )
performEnvironmentCheck( performEnvironmentCheck(
// Older versions of Valet might be located in `/usr/local/bin` regardless of Homebrew prefix // Check for Valet; it can be symlinked or in .composer/vendor/bin
!(Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/usr/local/bin/valet") !(Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/usr/local/bin/valet")
|| Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/opt/homebrew/bin/valet")), || Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/opt/homebrew/bin/valet")
|| Shell.pipe("cat /private/etc/sudoers.d/valet").contains(".composer/vendor/bin/valet")
),
messageText: "startup.errors.sudoers_valet.title".localized, messageText: "startup.errors.sudoers_valet.title".localized,
informativeText: "startup.errors.sudoers_valet.desc".localized, informativeText: "startup.errors.sudoers_valet.desc".localized,
breaking: true breaking: true