From 9b4b8f29b22bb8c0012f36b172ba44e4fc3f27d4 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Wed, 15 Jan 2020 04:53:00 +0100 Subject: [PATCH] =?UTF-8?q?fix(bundler):=20generate=20PRs=20for=20?= =?UTF-8?q?=E2=80=9Cfatal:=20Could=20not=20parse=20object=E2=80=9D=20lockf?= =?UTF-8?q?ile=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/manager/bundler/artifacts.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/manager/bundler/artifacts.ts b/lib/manager/bundler/artifacts.ts index 4b280afcf6..b3bc902322 100644 --- a/lib/manager/bundler/artifacts.ts +++ b/lib/manager/bundler/artifacts.ts @@ -145,6 +145,16 @@ export async function updateArtifacts( }, ]; } catch (err) /* istanbul ignore next */ { + if (err.stderr && err.stderr.startsWith('fatal: Could not parse object')) { + return [ + { + artifactError: { + lockFile: lockFileName, + stderr: err.stdout + '\n' + err.stderr, + }, + }, + ]; + } if ( (err.stdout && err.stdout.includes('Please supply credentials for this source')) || @@ -158,6 +168,7 @@ export async function updateArtifacts( { err }, 'Gemfile.lock update failed due to missing credentials - skipping branch' ); + // Do not generate these PRs because we don't yet support Bundler authentication global.repoCache.bundlerArtifactsError = BUNDLER_INVALID_CREDENTIALS; throw new Error(BUNDLER_INVALID_CREDENTIALS); } -- GitLab