mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2026-03-30 08:20:09 +02:00
🐛 Perform determinePhpAlias() at startup (#310)
This commit is contained in:
@@ -158,6 +158,19 @@ class Startup {
|
||||
titleText: "startup.errors.php_brew_info_invalid.title".localized,
|
||||
subtitleText: "startup.errors.php_brew_info_invalid.subtitle".localized,
|
||||
descriptionText: "startup.errors.php_brew_info_invalid.desc".localized
|
||||
),
|
||||
// =================================================================================
|
||||
// Make sure we can determine the PHP alias.
|
||||
// =================================================================================
|
||||
EnvironmentCheck(
|
||||
command: { container in
|
||||
await container.phpEnvs.determinePhpAlias()
|
||||
return PhpEnvironments.brewPhpAlias == nil
|
||||
},
|
||||
name: "`brew` alias is not nil and valid",
|
||||
titleText: "startup.errors.could_not_determine_alias.title".localized,
|
||||
subtitleText: "startup.errors.could_not_determine_alias.subtitle".localized,
|
||||
descriptionText: "startup.errors.could_not_determine_alias.desc".localized
|
||||
)
|
||||
]),
|
||||
EnvironmentCheckGroup(name: "valet", condition: { return Valet.installed }, checks: [
|
||||
|
||||
@@ -33,7 +33,7 @@ extension MainMenu {
|
||||
// Load additional preferences
|
||||
await container.preferences.loadCustomPreferences()
|
||||
|
||||
// Determine what the `php` formula is aliased to
|
||||
// Determine what the `php` formula is aliased to (again)
|
||||
await container.phpEnvs.determinePhpAlias()
|
||||
|
||||
// Make sure that broken symlinks are removed ASAP
|
||||
|
||||
@@ -676,6 +676,11 @@ You can do this by running `composer global update` in your terminal. After that
|
||||
"startup.errors.php_brew_info_invalid.subtitle" = "This will prevent PHP Monitor from starting correctly. It's possible that Homebrew is currently in a broken state or some additional logging crept into the output of this command. This is a known issue.";
|
||||
"startup.errors.php_brew_info_invalid.desc" = "Simply retrying may fix the issue, but you may want to run the command yourself if the issue persists and validate if it's valid JSON. Press OK, and select Retry to try again.";
|
||||
|
||||
// Could not determine alias
|
||||
"startup.errors.could_not_determine_alias.title" = "Could not determine which version the `php` formula is aliased to";
|
||||
"startup.errors.could_not_determine_alias.subtitle" = "This will prevent PHP Monitor from starting correctly. It's possible that Homebrew is currently in a broken state or that there's an issue with the formula.";
|
||||
"startup.errors.could_not_determine_alias.desc" = "Try running `brew update` to update your formulae and try again. If the issue persists, please report it on GitHub, as this could be a bug.";
|
||||
|
||||
// PHP not found in /usr/local/opt or /opt/homebrew/opt
|
||||
"startup.errors.php_opt.title" = "PHP is not correctly installed";
|
||||
"startup.errors.php_opt.subtitle" = "The PHP alias was not found in `%@`. The app will not work correctly until you resolve this issue.";
|
||||
@@ -701,6 +706,7 @@ You can do this by running `composer global update` in your terminal. After that
|
||||
"startup.errors.valet_version_unknown.subtitle" = "Parsing the output of `valet --version` failed. Make sure your Valet installation works and is up-to-date.";
|
||||
"startup.errors.valet_version_unknown.desc" = "Try running `valet --version` in a terminal to find out what's going on.";
|
||||
|
||||
// Valet not installed
|
||||
"startup.errors.valet_not_installed.title" = "Your Valet configuration directory is missing";
|
||||
"startup.errors.valet_not_installed.subtitle" = "The required directory `~/.config/valet` is missing. This usually means that you forgot to run `valet install`.";
|
||||
"startup.errors.valet_not_installed.desc" = "Assuming you already installed Valet via Composer, please run `valet install` to finish setting up Laravel Valet.
|
||||
|
||||
Reference in New Issue
Block a user