Skip to content

Commit

Permalink
fix: multiple dependencies error
Browse files Browse the repository at this point in the history
  • Loading branch information
dabing1022 committed Jan 13, 2021
1 parent e05c950 commit ac03d79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ def self.load_local_podfile
end

target_dependencies.each do |target_dependency|
next unless target_dependency.is_a?(Hash) &&
target_dependency.keys.first &&
target_dependency.keys.first == local_dependency.keys.first
dp_hash_equal = target_dependency.is_a?(Hash) &&
target_dependency.keys.first &&
target_dependency.keys.first == local_dependency.keys.first
dp_str_equal = target_dependency.is_a?(String) &&
target_dependency == local_dependency.keys.first
next unless dp_hash_equal || dp_str_equal

target_dependencies.delete target_dependency
break
Expand Down

0 comments on commit ac03d79

Please sign in to comment.