Skip to content

Commit 5084cee

Browse files
authored
Merge pull request #2265 from pocke/Update_Bundler_to_avoid_permission_error_on_GHA
Update Bundler to avoid permission error on GHA
2 parents 6f9877e + 7ca28f0 commit 5084cee

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.github/workflows/windows.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
ruby-version: ${{ matrix.ruby }}
23+
24+
# ucrt and mswin have the dev version Ruby.
25+
# It introduce checksum mismatches for bundled gems. So remove them before `bundle install`
26+
- name: Purge gem caches
27+
run: |
28+
ruby -e '
29+
exit if "${{ matrix.ruby }}" != "ucrt" && "${{ matrix.ruby }}" != "mswin"
30+
bundled_gems = Dir.glob("D:/ruby-${{ matrix.ruby }}/lib/ruby/gems/*/cache/*.gem")
31+
.map { |path| File.basename(path, ".gem")[/^(.+)-[^-]+$/, 1] }
32+
system "gem uninstall #{bundled_gems.join(" ")}", exception: true
33+
'
2334
- name: bundle install
2435
run: |
2536
bundle config set without profilers libs

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,4 +196,4 @@ DEPENDENCIES
196196
test-unit
197197

198198
BUNDLED WITH
199-
2.5.16
199+
2.6.3

steep/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ DEPENDENCIES
7676
steep (~> 1.9.2)
7777

7878
BUNDLED WITH
79-
2.5.16
79+
2.6.3

0 commit comments

Comments
 (0)