From 8001234f68402535bce30f3e212c6a432d4c34ef Mon Sep 17 00:00:00 2001 From: Gert Date: Fri, 28 Jul 2017 17:43:18 +0200 Subject: [PATCH] Show troubleshooting information when core installation fails References #84 --- CHANGELOG.md | 1 + lib/Main.coffee | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7e79a67..22c4cd94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 3.0.2 * Vertically align table cells to the top in the documentation pane +* [Show troubleshooting information when core installation fails](https://github.com/php-integrator/atom-base/issues/84) * [Fix project paths containing the tilde `~` symbolizing the home folder not working](https://github.com/php-integrator/atom-base/issues/295) * [Rephrase `Composer has errors to report` during installation](https://github.com/php-integrator/atom-base/issues/307) diff --git a/lib/Main.coffee b/lib/Main.coffee index ef372c18..250ba0c3 100644 --- a/lib/Main.coffee +++ b/lib/Main.coffee @@ -501,7 +501,16 @@ module.exports = atom.notifications.addSuccess('Core installation successful') failureHandler = () -> - atom.notifications.addError('Core installation failed') + message = + "The core failed to install. This can happen for a variety of reasons, such as an outdated PHP " + + "version or missing extensions.\n \n" + + + "Logs in the developer tools will likely provide you with more information about what is wrong. You " + + "can open it via the menu View → Developer → Toggle Developer Tools.\n \n" + + + "Additionally, the README provides more information about requirements and troubleshooting." + + atom.notifications.addError('Core installation failed', {detail: message, dismissable: true}) return @getCoreManager().install().then(successHandler, failureHandler)