@@ -173,34 +173,22 @@ def check_install_sanity
173173 EOS
174174 end
175175
176- if ENV [ "HOMEBREW_CHECK_RECURSIVE_VERSION_DEPENDENCIES" ]
177- version_hash = { }
178- version_conflicts = Set . new
179- recursive_formulae . each do |f |
180- name = f . name
181- unversioned_name , = name . split ( "@" )
182- version_hash [ unversioned_name ] ||= Set . new
183- version_hash [ unversioned_name ] << name
184- next if version_hash [ unversioned_name ] . length < 2
185- version_conflicts += version_hash [ unversioned_name ]
186- end
187- unless version_conflicts . empty?
188- raise CannotInstallFormulaError , <<-EOS . undent
189- #{ formula . full_name } contains conflicting version recursive dependencies:
190- #{ version_conflicts . to_a . join ", " }
191- View these with `brew deps --tree #{ formula . full_name } `.
192- EOS
193- end
194- end
195-
196- unless ENV [ "HOMEBREW_NO_CHECK_UNLINKED_DEPENDENCIES" ]
197- unlinked_deps = recursive_formulae . select do |dep |
198- dep . installed? && !dep . keg_only? && !dep . linked_keg . directory?
199- end
200-
201- unless unlinked_deps . empty?
202- raise CannotInstallFormulaError , "You must `brew link #{ unlinked_deps *" " } ` before #{ formula . full_name } can be installed"
203- end
176+ version_hash = { }
177+ version_conflicts = Set . new
178+ recursive_formulae . each do |f |
179+ name = f . name
180+ unversioned_name , = name . split ( "@" )
181+ version_hash [ unversioned_name ] ||= Set . new
182+ version_hash [ unversioned_name ] << name
183+ next if version_hash [ unversioned_name ] . length < 2
184+ version_conflicts += version_hash [ unversioned_name ]
185+ end
186+ unless version_conflicts . empty?
187+ raise CannotInstallFormulaError , <<-EOS . undent
188+ #{ formula . full_name } contains conflicting version recursive dependencies:
189+ #{ version_conflicts . to_a . join ", " }
190+ View these with `brew deps --tree #{ formula . full_name } `.
191+ EOS
204192 end
205193
206194 pinned_unsatisfied_deps = recursive_deps . select do |dep |
0 commit comments