thoughtbot / appraisal

A Ruby library for testing your library against different versions of dependencies.
https://thoughtbot.com
MIT License
1.25k stars 107 forks source link

`bundle check` returning exit code 1 but gems don't get installed #211

Closed nunommc closed 11 months ago

nunommc commented 1 year ago

I've struggled a little bit to get appraisal to run the specs for acts_as_tenant gem.

See the output below. The command that took 7m 8s (top-right corner) was bundle install (most of the time "Resolving dependencies...") image

$ bundle exec appraisal install
>> bundle check --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/rails_6_1.gemfile' || bundle install --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/rails_6_1.gemfile' --retry 1
The Gemfile's dependencies are satisfied
>> bundle check --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/rails_7.gemfile' || bundle install --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/rails_7.gemfile' --retry 1
The Gemfile's dependencies are satisfied
>> bundle check --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/sidekiq_7.gemfile' || bundle install --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/sidekiq_7.gemfile' --retry 1
The Gemfile's dependencies are satisfied

Despite of the "The Gemfile's dependencies are satisfied" output, that didn't seem to be true, because by running each o the commands on the left-hand side of the OR operator it was returning an EXIT STATUS 1 (error).

image

Then by running the 2nd part of the command manually (ie bundle install --gemfile='/home/nuno/rails/gems/acts_as_tenant/gemfiles/rails_6_1.gemfile' --retry 1) it installed the missing gems and I was then able to run the specs successfully.

I'm not too sure why "The Gemfile's dependencies are satisfied" is being printed when some gems are missing.

nunommc commented 1 year ago

I replaced the following in my Gemfile

I believe #176 fixed the issue above, as everything installed nicely after changing the following:

- gem "appraisal"
+ gem "appraisal", github: "thoughtbot/appraisal", branch: 'main'

Could you please publish a new version of this gem?

nickcharlton commented 11 months ago

Ah right, okay. I'm looking at cutting a new release today/tomorrow so I'll close this for now. Thanks for reporting.