From 4475d1e0f57d49a34739c94681c96237ff1af0d1 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 4 Oct 2018 15:08:38 +0100 Subject: [PATCH] cleanup: remove vendor/bundle/ruby. Otherwise gem paths will contain references to a now-deleted Ruby. --- Library/Homebrew/cleanup.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cleanup.rb b/Library/Homebrew/cleanup.rb index 38dc60e760..25653a4818 100644 --- a/Library/Homebrew/cleanup.rb +++ b/Library/Homebrew/cleanup.rb @@ -320,10 +320,12 @@ module Homebrew return unless Dir.glob(portable_ruby_glob).empty? return unless portable_ruby_path.exist? + bundler_path = vendor_path/"bundle/ruby" if dry_run? + puts "Would remove: #{bundler_path} (#{bundler_path.abv})" puts "Would remove: #{portable_ruby_path} (#{portable_ruby_path.abv})" else - FileUtils.rm_rf portable_ruby_path + FileUtils.rm_rf [bundler_path, portable_ruby_path] end end