Skip to content

Commit e372480

Browse files
🐛 Fix issue with Valet precedence (#77)
1 parent b7766ae commit e372480

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

PHP Monitor.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@
831831
CODE_SIGN_IDENTITY = "Apple Development";
832832
CODE_SIGN_STYLE = Automatic;
833833
COMBINE_HIDPI_IMAGES = YES;
834-
CURRENT_PROJECT_VERSION = 136;
834+
CURRENT_PROJECT_VERSION = 137;
835835
DEVELOPMENT_TEAM = 8M54J5J787;
836836
ENABLE_HARDENED_RUNTIME = YES;
837837
INFOPLIST_FILE = phpmon/Info.plist;
@@ -840,7 +840,7 @@
840840
"@executable_path/../Frameworks",
841841
);
842842
MACOSX_DEPLOYMENT_TARGET = 11.0;
843-
MARKETING_VERSION = 4.1.1;
843+
MARKETING_VERSION = 4.1.2;
844844
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
845845
PRODUCT_NAME = "$(TARGET_NAME)";
846846
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -856,7 +856,7 @@
856856
CODE_SIGN_IDENTITY = "Apple Development";
857857
CODE_SIGN_STYLE = Automatic;
858858
COMBINE_HIDPI_IMAGES = YES;
859-
CURRENT_PROJECT_VERSION = 136;
859+
CURRENT_PROJECT_VERSION = 137;
860860
DEVELOPMENT_TEAM = 8M54J5J787;
861861
ENABLE_HARDENED_RUNTIME = YES;
862862
INFOPLIST_FILE = phpmon/Info.plist;
@@ -865,7 +865,7 @@
865865
"@executable_path/../Frameworks",
866866
);
867867
MACOSX_DEPLOYMENT_TARGET = 11.0;
868-
MARKETING_VERSION = 4.1.1;
868+
MARKETING_VERSION = 4.1.2;
869869
PRODUCT_BUNDLE_IDENTIFIER = com.nicoverbruggen.phpmon;
870870
PRODUCT_NAME = "$(TARGET_NAME)";
871871
PROVISIONING_PROFILE_SPECIFIER = "";

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,15 @@ If you're on an Apple Silicon-based Mac, you'll need to add:
111111
# on an M1 Mac
112112
export PATH=$HOME/bin:/opt/homebrew/bin:$PATH
113113

114-
and add the following to your .zshrc:
114+
and add the following to your .zshrc, but add this BEFORE the homebrew PATH additions:
115115

116116
export PATH=$HOME/bin:~/.composer/vendor/bin:$PATH
117+
118+
If you're adding composer and Homebrew binaries, ensure that Homebrew binaries are preferred by adding these to the path last. On my system, that looks like this:
119+
120+
export PATH=$HOME/bin:/usr/local/bin:$PATH
121+
export PATH=$HOME/bin:~/.composer/vendor/bin:$PATH
122+
export PATH=$HOME/bin:/opt/homebrew/bin:$PATH
117123

118124
Make sure PHP is linked correctly:
119125

phpmon/Domain/Core/Startup.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Startup {
5959
// Check for Valet; it can be symlinked or in .composer/vendor/bin
6060
!(Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/usr/local/bin/valet")
6161
|| Shell.pipe("cat /private/etc/sudoers.d/valet").contains("/opt/homebrew/bin/valet")
62-
|| Shell.pipe("cat /private/etc/sudoers.d/valet").contains(".composer/vendor/bin/valet")
6362
),
6463
messageText: "startup.errors.sudoers_valet.title".localized,
6564
informativeText: "startup.errors.sudoers_valet.desc".localized,

phpmon/Domain/Terminal/Paths.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Paths {
3838
// - MARK: Binaries
3939

4040
public static var valet: String {
41-
return "/Users/\(whoami)/.composer/vendor/bin/valet"
41+
return "\(binPath)/valet"
4242
}
4343

4444
public static var brew: String {

phpmon/Localizable.strings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ You can do this by running `composer global update` in your terminal. After that
182182

183183
/// 5. Valet & sudoers
184184
"startup.errors.sudoers_valet.title" = "Valet has not been added to sudoers.d";
185-
"startup.errors.sudoers_valet.desc" = "You must run `sudo valet trust` to ensure Valet can start and stop services without having to use sudo every time. The app will not work correctly until you resolve this issue.";
185+
"startup.errors.sudoers_valet.desc" = "You must run `sudo valet trust` to ensure Valet can start and stop services without having to use sudo every time. The app will not work correctly until you resolve this issue. If you did this before, please run `sudo valet trust` again.";
186186

187187
/// 6. Multiple services active
188188
"startup.errors.services.title" = "Multiple PHP services are active";

0 commit comments

Comments
 (0)