Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bundle outdated --strict crash #4133

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

deivid-rodriguez
Copy link
Member

What was the end-user or developer problem that led to this PR?

This command would crash when there are some dependencies not used under
the current platform.

What is your fix for the problem, implemented in this PR?

Check for nil at the proper place.

Fixes #4130.

Make sure the following tasks are checked

This command would crash when there are some dependencies not used under
the current platform.
@simi
Copy link
Member

simi commented Dec 13, 2020

Nice, I wasn't sure this is intended. Since if I understand it now, outdated gems with currently unsupported platform would not be reported, but they were before 2.2.0, which (I'm not sure) could be breaking change.

@deivid-rodriguez
Copy link
Member Author

Ha, good catch! I assumed they were ignored in the past too. Definitely a less useful behaviour, I'll have a look and see if I can fix it.

@deivid-rodriguez
Copy link
Member Author

@simi I double checked this and bundler 2.1.4 has the same behaviour. That behaviour could even be considered a bug, because bundle update --lock updates the lockfile for all platforms. But since the behaviour is unchanged from 2.1.4, I'd ship this to fix the crash, and open a separate ticket to fix the behaviour.

@deivid-rodriguez
Copy link
Member Author

Thanks @simi!! 🎉

@deivid-rodriguez deivid-rodriguez merged commit 0472f3f into master Dec 13, 2020
@deivid-rodriguez deivid-rodriguez deleted the bundle_outdated_strict_crash branch December 13, 2020 15:18
deivid-rodriguez added a commit that referenced this pull request Dec 14, 2020
Fix `bundle outdated --strict` crash

(cherry picked from commit 0472f3f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Got "NoMethodError: undefined method `version' for nil:NilClass" when running "bundle outdated --strict"
3 participants