Skip to content

Fix crash when updating git dependencies#5934

Merged
deivid-rodriguez merged 1 commit intomainfrom
deivid-rodriguez/update-git-gems-with-eval-gemfile
Oct 21, 2022
Merged

Fix crash when updating git dependencies#5934
deivid-rodriguez merged 1 commit intomainfrom
deivid-rodriguez/update-git-gems-with-eval-gemfile

Conversation

@deivid-rodriguez
Copy link
Copy Markdown
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