From ac03d7970bb6ece58af5fe30ec0448f0b30ae249 Mon Sep 17 00:00:00 2001 From: dabing1022 Date: Wed, 13 Jan 2021 17:17:07 +0800 Subject: [PATCH] fix: multiple dependencies error --- .../lib/cocoapods-imy-bin/command/bin/update.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/update.rb b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/update.rb index bda4dff..2329009 100755 --- a/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/update.rb +++ b/cocoapods-imy-bin/lib/cocoapods-imy-bin/command/bin/update.rb @@ -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