From e5a267414fde5bb4dec4599ed01b44941c337575 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 7 Dec 2020 21:11:25 +0100 Subject: [PATCH] Fix value for options --- dist/index.js | 6 ++++-- index.js | 4 +++- windows.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 919eb43..762ae8e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -27744,7 +27744,7 @@ async function downloadAndExtract(engine, version, url, base, rubyPrefix) { }) await common.measure('Extracting Ruby', async () => - exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${parentDir}`], {silent: true})) + exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${parentDir}`], { silent: true })) if (base !== path.basename(rubyPrefix)) { await io.mv(path.join(parentDir, base), rubyPrefix) @@ -51434,9 +51434,11 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b return false } + // Before the lockfile exists, we need to specify which Bundler version to use explicitly + const optionsWithBundlerVersion = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } } + // config const path = 'vendor/bundle' - const optionsWithBundlerVersion = {options: {env: {...process.env, BUNDLER_VERSION: bundlerVersion}}} await exec.exec('bundle', ['config', '--local', 'path', path], optionsWithBundlerVersion) diff --git a/index.js b/index.js index 350cec0..7d0e58a 100644 --- a/index.js +++ b/index.js @@ -240,9 +240,11 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b return false } + // Before the lockfile exists, we need to specify which Bundler version to use explicitly + const optionsWithBundlerVersion = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } } + // config const path = 'vendor/bundle' - const optionsWithBundlerVersion = {options: {env: {...process.env, BUNDLER_VERSION: bundlerVersion}}} await exec.exec('bundle', ['config', '--local', 'path', path], optionsWithBundlerVersion) diff --git a/windows.js b/windows.js index 517abe4..1380e1a 100644 --- a/windows.js +++ b/windows.js @@ -68,7 +68,7 @@ async function downloadAndExtract(engine, version, url, base, rubyPrefix) { }) await common.measure('Extracting Ruby', async () => - exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${parentDir}`], {silent: true})) + exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${parentDir}`], { silent: true })) if (base !== path.basename(rubyPrefix)) { await io.mv(path.join(parentDir, base), rubyPrefix)