Fix bug causing Executable to use Docker first, instead of builtin command

This commit is contained in:
Glavin Wiechert 2017-06-16 01:22:59 -03:00
parent 0b2b06a928
commit 7899be966b
1 changed files with 3 additions and 1 deletions

View File

@ -396,6 +396,7 @@ class HybridExecutable extends Executable
})
return @docker
installedWithDocker: false
init: () ->
super()
.catch((error) =>
@ -403,6 +404,7 @@ class HybridExecutable extends Executable
@docker.init()
.then(=> @runImage(@versionArgs, @versionRunOptions))
.then((text) => @saveVersion(text))
.then(() => @installedWithDocker = true)
.then(=> @)
.catch((dockerError) =>
@debug(dockerError)
@ -411,7 +413,7 @@ class HybridExecutable extends Executable
)
run: (args, options = {}) ->
if @docker and @docker.isInstalled
if @installedWithDocker and @docker and @docker.isInstalled
return @runImage(args, options)
super(args, options)