Permalink
Browse files

bypass gems check exit for custom lambda layers

  • Loading branch information...
tongueroo committed Jan 11, 2019
1 parent 53444ef commit 83e3d58933b62113029c29d8dce9daaa8e9df531
Showing with 8 additions and 3 deletions.
  1. +7 −2 lib/jets/builders/gem_replacer.rb
  2. +1 −1 vendor/jets-gems
@@ -7,9 +7,14 @@ def initialize(options)

def run
check = Jets::Gems::Check.new
found_gems = check.run! # exits early if missing gems found
if Jets.config.lambda.layers.empty?
found_gems = check.run! # exits early if missing gems found
else
# assumes missing gems are in the provided custom layer by the user
found_gems = check.run # does not exist early
end

# Reaching here means its safe to download and extract the gems
# found gems will only have gems that were found
found_gems.each do |gem_name, source|
options = @options.merge(source_url: source)
gem_extractor = Jets::Gems::Extract::Gem.new(gem_name, options)

0 comments on commit 83e3d58

Please sign in to comment.