From 1482e9180a61fe047556c32abff4d7f5895bd100 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 11 Dec 2020 14:15:13 +0100 Subject: [PATCH] Install the exact same Bundler version as in the lockfile if there is a lockfile --- dist/index.js | 5 ++--- index.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index fe0f2e5..8084a8a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -51396,9 +51396,8 @@ function readBundledWithFromGemfileLock(lockFile) { const nextLine = lines[bundledWithLine+1] if (nextLine && /^\d+/.test(nextLine.trim())) { const bundlerVersion = nextLine.trim() - const majorVersion = bundlerVersion.match(/^\d+/)[0] - console.log(`Using Bundler ${majorVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`) - return majorVersion + console.log(`Using Bundler ${bundlerVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`) + return bundlerVersion } } } diff --git a/index.js b/index.js index 7b8ffbb..a19b3b9 100644 --- a/index.js +++ b/index.js @@ -181,9 +181,8 @@ function readBundledWithFromGemfileLock(lockFile) { const nextLine = lines[bundledWithLine+1] if (nextLine && /^\d+/.test(nextLine.trim())) { const bundlerVersion = nextLine.trim() - const majorVersion = bundlerVersion.match(/^\d+/)[0] - console.log(`Using Bundler ${majorVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`) - return majorVersion + console.log(`Using Bundler ${bundlerVersion} from ${lockFile} BUNDLED WITH ${bundlerVersion}`) + return bundlerVersion } } }