Skip to content

Commit

Permalink
fix: Prevent bundler's SelfManager from switching (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Oct 6, 2023
1 parent ae27f33 commit 60fc011
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
ruby-version: ${{ matrix.ruby }}
bundler: none
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run ${{ matrix.tool || 'test' }}
shell: bash
env:
Expand Down
3 changes: 3 additions & 0 deletions toys-core/lib/toys/utils/gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def find_lockfile_path(gemfile_path)
end

def setup_bundle(gemfile_path, groups: nil, retries: nil)
# Lock the bundler version, preventing bundler's SelfManager from
# installing a different bundler and taking over the process.
::ENV["BUNDLER_VERSION"] = ::Bundler::VERSION
check_gemfile_compatibility(gemfile_path)
groups = Array(groups)
modified_gemfile_path = create_modified_gemfile(gemfile_path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ DEPENDENCIES
rubocop-performance (~> 1.5.2)

BUNDLED WITH
2.1.4
2.3.26
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ DEPENDENCIES
highline (= 2.0.2)

BUNDLED WITH
2.1.4
2.3.26

0 comments on commit 60fc011

Please sign in to comment.