From ebe74a8bcb4cd4b086164325e9a9325d04fa7526 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Mon, 22 Aug 2022 15:03:08 -0500 Subject: [PATCH 1/2] Don't install Bundler on Windows mingw, mswin & ucrt builds --- bundler.js | 2 +- dist/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index df27a009d..3e86c07c0 100644 --- a/bundler.js +++ b/bundler.js @@ -72,7 +72,7 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock if (bundlerVersion === 'default') { if (common.isBundler2dot2Default(engine, rubyVersion)) { - if (common.windows && engine === 'ruby') { + if (common.windows && engine === 'ruby' && (common.isStableVersion(rubyVersion) || rubyVersion === 'head')) { // https://github.com/ruby/setup-ruby/issues/371 console.log(`Installing latest Bundler for ${engine}-${rubyVersion} on Windows because bin/bundle does not work in bash otherwise`) bundlerVersion = 'latest' diff --git a/dist/index.js b/dist/index.js index a0f8eeaae..67d436d90 100644 --- a/dist/index.js +++ b/dist/index.js @@ -86,7 +86,7 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p if (bundlerVersion === 'default') { if (common.isBundler2dot2Default(engine, rubyVersion)) { - if (common.windows && engine === 'ruby') { + if (common.windows && engine === 'ruby' && (common.isStableVersion(rubyVersion) || rubyVersion === 'head')) { // https://github.com/ruby/setup-ruby/issues/371 console.log(`Installing latest Bundler for ${engine}-${rubyVersion} on Windows because bin/bundle does not work in bash otherwise`) bundlerVersion = 'latest' From 62651874ab19ab88f854f650a9354c9289c53298 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Tue, 23 Aug 2022 18:53:30 +0200 Subject: [PATCH 2/2] `which rake` does not work on Windows on Ruby 2.5+ --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 24c1bd60f..47b75fe7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -115,9 +115,12 @@ jobs: env: BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile - - name: which ruby, rake, bundle + - name: which ruby, bundle shell: bash - run: which -a ruby rake bundle + run: which -a ruby bundle + - name: which rake + run: which -a rake + if: "!startsWith(matrix.os, 'windows')" - name: where ruby, rake, bundle if: startsWith(matrix.os, 'windows') run: |