From f7500637fe43f3e277c417215e6ab577c1098c4a Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 31 Mar 2021 12:21:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Be=20more=20lenient=20about=20Va?= =?UTF-8?q?let=20checks=20(#27)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/Terminal/Startup.swift | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/phpmon/Domain/Terminal/Startup.swift b/phpmon/Domain/Terminal/Startup.swift index d879a58..b7ff1d7 100644 --- a/phpmon/Domain/Terminal/Startup.swift +++ b/phpmon/Domain/Terminal/Startup.swift @@ -38,8 +38,11 @@ class Startup { ) performEnvironmentCheck( - // Older versions of Valet might be located in `/usr/local/bin` regardless of Homebrew prefix - !(Shell.fileExists("/usr/local/bin/valet") || Shell.fileExists("/opt/homebrew/bin/valet")), + // 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("~/.composer/vendor/bin/valet") + ), messageText: "startup.errors.valet_executable.title".localized, informativeText: "startup.errors.valet_executable.desc".localized, breaking: true @@ -53,9 +56,11 @@ class Startup { ) 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("/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, informativeText: "startup.errors.sudoers_valet.desc".localized, breaking: true