From 1682e5e3893672af70e2c22528571036c327223e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20Ve=C4=8Derek?= Date: Tue, 11 Aug 2020 12:00:39 +0200 Subject: [PATCH] Read path to gemfile from env variable --- dist/index.js | 3 ++- index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7dec8ab..feaa85a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2361,7 +2361,8 @@ async function installBundler(bundlerVersionInput, platform, rubyPrefix, engine, var bundlerVersion = bundlerVersionInput if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') { - bundlerVersion = readBundledWithFromGemfileLock('Gemfile.lock') + const gemfilePath = `${process.env['BUNDLE_GEMFILE'] || 'Gemfile'}.lock` + bundlerVersion = readBundledWithFromGemfileLock(gemfilePath) if (!bundlerVersion) { bundlerVersion = 'latest' } diff --git a/index.js b/index.js index 6d9ed21..f3cccde 100644 --- a/index.js +++ b/index.js @@ -175,7 +175,8 @@ async function installBundler(bundlerVersionInput, platform, rubyPrefix, engine, var bundlerVersion = bundlerVersionInput if (bundlerVersion === 'default' || bundlerVersion === 'Gemfile.lock') { - bundlerVersion = readBundledWithFromGemfileLock('Gemfile.lock') + const gemfilePath = `${process.env['BUNDLE_GEMFILE'] || 'Gemfile'}.lock` + bundlerVersion = readBundledWithFromGemfileLock(gemfilePath) if (!bundlerVersion) { bundlerVersion = 'latest' }