From 3cff2d6469fd592ad493db4b5b59d1f1ca2a7125 Mon Sep 17 00:00:00 2001 From: Nico Verbruggen Date: Wed, 20 Apr 2022 22:31:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20issue=20w/=20flag=20evalua?= =?UTF-8?q?tion=20order=20(#165)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PHP Monitor.xcodeproj/project.pbxproj | 4 ++-- phpmon/Domain/Menu/MainMenu+Startup.swift | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/PHP Monitor.xcodeproj/project.pbxproj b/PHP Monitor.xcodeproj/project.pbxproj index 88303ef..f426176 100644 --- a/PHP Monitor.xcodeproj/project.pbxproj +++ b/PHP Monitor.xcodeproj/project.pbxproj @@ -1324,7 +1324,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 760; + CURRENT_PROJECT_VERSION = 761; DEBUG = YES; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; @@ -1350,7 +1350,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 760; + CURRENT_PROJECT_VERSION = 761; DEBUG = NO; DEVELOPMENT_TEAM = 8M54J5J787; ENABLE_HARDENED_RUNTIME = YES; diff --git a/phpmon/Domain/Menu/MainMenu+Startup.swift b/phpmon/Domain/Menu/MainMenu+Startup.swift index b0bf4da..8849dee 100644 --- a/phpmon/Domain/Menu/MainMenu+Startup.swift +++ b/phpmon/Domain/Menu/MainMenu+Startup.swift @@ -29,8 +29,18 @@ extension MainMenu { When the environment is all clear and the app can run, let's go. */ private func onEnvironmentPass() { + // Attempt to find out more info about Valet + if Valet.shared.version != nil { + Log.info("PHP Monitor has extracted the version number of Valet: \(Valet.shared.version!)") + } + + // Validate the version (this will enforce which versions of PHP are supported) + Valet.shared.validateVersion() + + // Actually detect the PHP versions PhpEnv.detectPhpVersions() + // Check for an alias conflict if HomebrewDiagnostics.hasAliasConflict() { DispatchQueue.main.async { BetterAlert() @@ -71,12 +81,7 @@ extension MainMenu { // Load the global hotkey App.shared.loadGlobalHotkey() - // Attempt to find out more info about Valet - if Valet.shared.version != nil { - Log.info("PHP Monitor has extracted the version number of Valet: \(Valet.shared.version!)") - } - - Valet.shared.validateVersion() + // Preload sites Valet.shared.startPreloadingSites() if (Valet.shared.config.tld != "test") {