Fix to show executable error instead of Docker

This commit is contained in:
Steven Zeck 2018-05-30 18:30:09 -05:00
parent b6214f2563
commit f22608ca28
No known key found for this signature in database
GPG Key ID: 621B374B29AA814A
1 changed files with 3 additions and 4 deletions

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