Skip to content

Commit

Permalink
Merge pull request ManageIQ#13631 from hayesr/bundler_1_14
Browse files Browse the repository at this point in the history
Handle case when `dependencies` is empty.
(cherry picked from commit 7ca77a3)
  • Loading branch information
jrafanie authored and simaishi committed Jan 24, 2017
1 parent a5486c5 commit bbd2e4f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ eval_gemfile(File.expand_path("gems/pending/Gemfile", __dir__))
# override_gem 'manageiq-ui-classic', :path => File.expand_path("../manageiq-ui-classic", __dir__))
#
def override_gem(name, *args)
raise "Trying to override unknown gem #{name}" unless (dependency = dependencies.find { |d| d.name == name })
dependencies.delete(dependency)
gem name, *args
if dependencies.any?
raise "Trying to override unknown gem #{name}" unless (dependency = dependencies.find { |d| d.name == name })
dependencies.delete(dependency)

gem name, *args
end
end

# Load developer specific Gemfile
Expand Down

0 comments on commit bbd2e4f

Please sign in to comment.