Permalink
Browse files

fix gem replacer for macosx by using rsync to copy

  • Loading branch information...
tongueroo committed Dec 14, 2018
1 parent 0846a09 commit 90d6393b8e4ae35bef0b2a4d5b648779abfb132a
Showing with 4 additions and 4 deletions.
  1. +1 −1 .ruby-version
  2. +1 −1 Gemfile.lock
  3. +2 −2 lib/jets/builders/gem_replacer.rb
@@ -1 +1 @@
2.5.1
2.5.3
@@ -178,4 +178,4 @@ DEPENDENCIES
webpacker!

BUNDLED WITH
1.17.1
1.17.2
@@ -30,8 +30,8 @@ def move_opt_gems_to_vendor
opt_gems = "#{code}/opt/ruby/gems/#{Jets::Gems.ruby_folder}"
vendor_gems = "#{code}/vendor/bundle/ruby/#{Jets::Gems.ruby_folder}"
# https://stackoverflow.com/questions/23698183/how-to-force-cp-to-overwrite-directory-instead-of-creating-another-one-inside
# $ cp -TRv foo/ bar/
sh "cp -TR #{opt_gems} #{vendor_gems}"
# Trailing slashes are required
sh "rsync -a --links #{opt_gems}/ #{vendor_gems}/"
# clean up opt compiled gems
FileUtils.rm_rf("#{code}/opt/ruby")
end

0 comments on commit 90d6393

Please sign in to comment.