From 221b2fe21ab65afb2169b4507285e8a10467d894 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 9 Nov 2018 13:19:45 +0100 Subject: [PATCH] =?UTF-8?q?fix(gitlab):=20catch/throw=20=E2=80=98empty?= =?UTF-8?q?=E2=80=99=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/platform/gitlab/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index 337b19d1a2..5c5e6bdbf2 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -160,6 +160,9 @@ async function initRepo({ await Promise.all([getPrList(), getFileList()]); } catch (err) /* istanbul ignore next */ { logger.debug('Caught initRepo error'); + if (err.message.includes('HEAD is not a symbolic ref')) { + throw new Error('empty'); + } if (err.message === 'archived') { throw err; } -- GitLab