From 1a610ff3f565f070f76ccef134b7cabedfc01a33 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Sun, 13 Jan 2019 06:49:46 +0100 Subject: [PATCH] =?UTF-8?q?fix(config):=20don=E2=80=99t=20require=20token?= =?UTF-8?q?=20if=20in=20appMode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config/index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/config/index.js b/lib/config/index.js index cac374e533..a7713b96e6 100644 --- a/lib/config/index.js +++ b/lib/config/index.js @@ -114,14 +114,16 @@ async function parseConfigs(env, argv) { credentials.token = base64(`${username}:${password}`); } - if (!credentials.token) { - throw new Error(`You need to supply a ${platformInfo.name} token.`); - } + if (!global.appMode) { + if (!credentials.token) { + throw new Error(`You need to supply a ${platformInfo.name} token.`); + } - hostRules.update({ - ...credentials, - default: true, - }); + hostRules.update({ + ...credentials, + default: true, + }); + } if (config.autodiscover) { // Autodiscover list of repositories -- GitLab