Skip to content

Commit

Permalink
Check extra_runtime_dependencies is set before iterating over them
Browse files Browse the repository at this point in the history
  • Loading branch information
daveallie committed Jul 3, 2018
1 parent 6f23e69 commit 429eb44
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/puma/launcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,14 @@ def prune_bundler
"#{d.name}:#{spec.version.to_s}"
end

@options[:extra_runtime_dependencies].each do |d_name|
spec = Bundler.rubygems.loaded_specs(d_name) rescue nil
if spec
deps << "#{d_name}:#{spec.version.to_s}"
else
log "* Couldn't to load extra dependency: #{d_name}"
if @options[:extra_runtime_dependencies]
@options[:extra_runtime_dependencies].each do |d_name|
spec = Bundler.rubygems.loaded_specs(d_name) rescue nil
if spec
deps << "#{d_name}:#{spec.version.to_s}"
else
log "* Couldn't to load extra dependency: #{d_name}"
end
end
end

Expand Down

0 comments on commit 429eb44

Please sign in to comment.