Skip to content

Commit

Permalink
Fix CocoaPods path transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
majd committed Aug 13, 2021
1 parent 03cfebf commit 0c59b26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/license_finder/package_managers/cocoa_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def acknowledgements_path
end

def read_plist(pathname)
JSON.parse(`plutil -convert json -o - '#{pathname.gsub!(%r{[^0-9A-Za-z.\-'/]}, '')}'`)
transformed_pathname = pathname.gsub!(%r{[^0-9A-Za-z. \-'/]}, '')
transformed_pathname = pathname if transformed_pathname.nil?
JSON.parse(`plutil -convert json -o - '#{transformed_pathname}'`)
end
end
end

0 comments on commit 0c59b26

Please sign in to comment.