Skip to content

Commit

Permalink
Merge pull request #848 from majd/fix/cocoapods
Browse files Browse the repository at this point in the history
Fix CocoaPods path transformation
  • Loading branch information
xtreme-shane-lattanzio authored Aug 18, 2021
2 parents 03cfebf + 0c59b26 commit 3428ccd
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 3428ccd

Please sign in to comment.