rubymem / bundler-leak

Known-leaky gems verification for bundler: `bundle leak` to check your app and find leaky gems in your Gemfile :gem::droplet:
https://www.rubymem.com
GNU General Public License v3.0
289 stars 11 forks source link

`bundle leak` doesn't work _out of the box_ #14

Closed etagwerker closed 5 years ago

etagwerker commented 5 years ago

Creating this issue to keep track of https://github.com/rubymem/bundler-leak/issues/10#issuecomment-527314668.

It seems that bundle leak check --update is necessary for the tool to work out of the box

It would be great if bundle leak did an update the first time it runs. What do you think, @bronzdoc?

jpanderson-outreach commented 5 years ago

For what it's worth, I had a hard time getting bundle leak check --update to actually update as I'd pulled down before the new version. It looks like [the command to run is just being overwritten](https://github.com/rubymem/bundler-leak/blob/master/lib/bundler/plumber/database.rb#L102 the c):

              command = %w(git fetch --all)
              command = %w(git reset --hard origin/master)
              command << '--quiet' if options[:quiet]

So if you haven't fetched, it just resets hard to the same master you already have.

bronzdoc commented 5 years ago

Should be fixed in https://github.com/rubymem/bundler-leak/pull/25

Please let me know if not.