Skip to content

Commit

Permalink
Show troubleshooting information when core installation fails
Browse files Browse the repository at this point in the history
References #84
  • Loading branch information
Gert-dev committed Jul 28, 2017
1 parent b7b93c5 commit 8001234
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
11 changes: 10 additions & 1 deletion lib/Main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 8001234

Please sign in to comment.