From d2c0b0e727d9ef0b29767c6aa641b4e39b339d94 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Mon, 20 Jan 2020 22:05:41 +0100
Subject: [PATCH] fix: binarySource docker only if opts set

---
 lib/util/exec/index.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/util/exec/index.ts b/lib/util/exec/index.ts
index e7f0cfc163..d47e37954c 100644
--- a/lib/util/exec/index.ts
+++ b/lib/util/exec/index.ts
@@ -93,7 +93,7 @@ export async function exec(
   };
 
   let commands = typeof cmd === 'string' ? [cmd] : cmd;
-  if (execConfig.binarySource === BinarySource.Docker) {
+  if (execConfig.binarySource === BinarySource.Docker && docker) {
     logger.debug('Using docker to execute');
     const dockerOptions = {
       ...docker,
-- 
GitLab