Skip to content

Commit

Permalink
Get better info on an unknown error (#8211)
Browse files Browse the repository at this point in the history
Currently we get a missing method call on `nil`, which is zero useful.

Hopefully this will give a bit more information about the issue.
  • Loading branch information
deivid-rodriguez authored Oct 17, 2023
1 parent 92d8f7d commit 8d9a969
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ def fetch_updated_dependency_files
end

def updated_requirement_or_setup_file_content(new_req, old_req)
content = get_original_file(new_req.fetch(:file)).content
original_file = get_original_file(new_req.fetch(:file))
raise "Could not find a dependency file for #{new_req}" unless original_file

RequirementReplacer.new(
content: content,
content: original_file.content,
dependency_name: dependency.name,
old_requirement: old_req.fetch(:requirement),
new_requirement: new_req.fetch(:requirement),
Expand Down

0 comments on commit 8d9a969

Please sign in to comment.