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 crash when updating git dependencies #5934

Merged

Conversation

deivid-rodriguez
Copy link
Contributor

If there's an evaled gemfile that also includes git dependencies, it would result in a crash like the following:

Failure/Error:
  dependency.requirements.
  find { |f| f[:file] == file.name }.
  fetch(:source).fetch(:ref)

NoMethodError:
  undefined method `fetch' for nil:NilClass

              fetch(:source).fetch(:ref)

We need to check the Gemfile name being updated, not generic names when figuring out if we should update any git pins.

@deivid-rodriguez deivid-rodriguez requested a review from a team as a code owner October 20, 2022 09:24
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/update-git-gems-with-eval-gemfile branch from a8843b3 to 3a8bfc1 Compare October 20, 2022 10:04
If there's an evaled gemfile that also includes git dependencies, it
would result in a crash like the following:

```
Failure/Error:
  dependency.requirements.
  find { |f| f[:file] == file.name }.
  fetch(:source).fetch(:ref)

NoMethodError:
  undefined method `fetch' for nil:NilClass

              fetch(:source).fetch(:ref)
```

We need to check the Gemfile name being updated, not generic names when
figuring out if we should update any git pins.
@deivid-rodriguez deivid-rodriguez force-pushed the deivid-rodriguez/update-git-gems-with-eval-gemfile branch from 3a8bfc1 to ed661cb Compare October 20, 2022 23:10
@deivid-rodriguez deivid-rodriguez merged commit 997c096 into main Oct 21, 2022
@deivid-rodriguez deivid-rodriguez deleted the deivid-rodriguez/update-git-gems-with-eval-gemfile branch October 21, 2022 11:25
@pavera pavera mentioned this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants