Merge pull request #2148 from szeck87/error-message-patch1

Fix to show executable error instead of Docker
This commit is contained in:
Steven Zeck 2018-06-04 00:17:41 -05:00 committed by GitHub
commit f4ca817c16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,5 @@
# Next
- Fixes an issue where Atom Beautify would display a Docker error instead of an executable error ([#2146](https://github.com/Glavin001/atom-beautify/issues/2146))
# v0.32.5 (2018-05-28)
- Fixes an issue with Rubocop not working on Windows ([#2092](https://github.com/Glavin001/atom-beautify/issues/2092))

View File

@ -4,7 +4,7 @@
[![GitHub issues](https://img.shields.io/github/issues/Glavin001/atom-beautify.svg?style=flat-square)](https://github.com/Glavin001/atom-beautify/issues)
[![Greenkeeper badge](https://badges.greenkeeper.io/Glavin001/atom-beautify.svg)](https://greenkeeper.io/)
[![Slack](https://unibeautify-slack.herokuapp.com/badge.svg)](https://unibeautify-slack.herokuapp.com/)
[![Slack](https://unibeautify-slack.glitch.me/badge.svg)](https://unibeautify-slack.glitch.me/)
[![Twitter Follow](https://img.shields.io/twitter/follow/unibeautify.svg?style=social&label=Follow)](https://twitter.com/unibeautify)
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)

View File

@ -394,13 +394,13 @@ class HybridExecutable extends Executable
)
.catch((error) =>
return Promise.reject(error) if not @docker?
return @
return Promise.resolve(error)
)
.then(() =>
.then((errorOrThis) =>
shouldTryWithDocker = not @isInstalled and @docker?
@verbose("Executable shouldTryWithDocker", shouldTryWithDocker, @isInstalled, @docker?)
if shouldTryWithDocker
return @initDocker()
return @initDocker().catch(() => Promise.reject(errorOrThis))
return @
)
.catch((error) =>
@ -460,5 +460,4 @@ class HybridExecutable extends Executable
)
)
module.exports = HybridExecutable