Skip to content

Commit

Permalink
chore(specs): Fail more helpfully when no non-default bundler is inst…
Browse files Browse the repository at this point in the history
…alled
  • Loading branch information
segiddins committed Nov 15, 2023
1 parent dffd969 commit bbb3466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
extend(Spec::Helpers)
begin
bundler = Dir[File.join(base_system_gems, "**/bundler-*.gem")].first || \
Gem.loaded_specs["bundler"].cache_file || \
raise("No bundler found in #{base_system_gems}")
Gem.loaded_specs["bundler"].then { _1.cache_file unless _1.default_gem? } || \
raise("No bundler found in #{base_system_gems}, run `gem install bundler` then try again")
system_gems bundler, "bundler-compose", path: pristine_system_gem_path
rescue StandardError
warn "Run `ruby -Ispec -rsupport/rubygems_ext -e 'Spec::Rubygems.install_test_deps'` to install deps"
Expand Down

0 comments on commit bbb3466

Please sign in to comment.