From 7661f4643d717f30543ee04a9946c2fcc1c66185 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Fri, 12 Mar 2021 09:46:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Handle=20`valet`=20install=20in?= =?UTF-8?q?=20`/opt/homebrew/bin`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- phpmon/Domain/Terminal/Startup.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/phpmon/Domain/Terminal/Startup.swift b/phpmon/Domain/Terminal/Startup.swift index 81e52ed..510894f 100644 --- a/phpmon/Domain/Terminal/Startup.swift +++ b/phpmon/Domain/Terminal/Startup.swift @@ -38,7 +38,9 @@ class Startup { ) self.performEnvironmentCheck( - !Shell.pipe("which valet").contains("/usr/local/bin/valet"), + // Older versions of Valet might be located in `/usr/local/bin` regardless of Homebrew prefix + !(Shell.pipe("which valet").contains("/usr/local/bin/valet") + || Shell.pipe("which valet").contains("/opt/homebrew/bin/valet")), messageText: "startup.errors.valet_executable.title".localized, informativeText: "startup.errors.valet_executable.desc".localized, breaking: true @@ -52,7 +54,9 @@ class Startup { ) self.performEnvironmentCheck( - !Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/usr/local/bin/valet"), + // Older versions of Valet might be located in `/usr/local/bin` regardless of Homebrew prefix + !(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")), messageText: "startup.errors.sudoers_valet.title".localized, informativeText: "startup.errors.sudoers_valet.desc".localized, breaking: true