Skip to content

Commit

Permalink
Handle nil resource args for some reason
Browse files Browse the repository at this point in the history
- Ran this against `signal-cli` and despite it having a valid-looking resource block, it failed on `undefined method 'str_content' for nil:NilClass`.
  • Loading branch information
issyl0 committed Feb 20, 2024
1 parent 5c7be57 commit 3bfe7e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
return if resource_nodes.empty?

%w[lxml pyyaml].each do |resource_name|
found = resource_nodes.find { |node| node.arguments.first.str_content == resource_name }
found = resource_nodes.find { |node| node.arguments&.first&.str_content == resource_name }
next unless found

uses_from_macos_nodes = find_every_method_call_by_name(body_node, :uses_from_macos)
Expand Down

0 comments on commit 3bfe7e5

Please sign in to comment.