Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils/gems: run bundle clean when install not required #15301

Merged
merged 2 commits into from Apr 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 11 additions & 1 deletion Library/Homebrew/utils/gems.rb
Expand Up @@ -194,8 +194,18 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true, groups:
end
false
end
else
elsif system bundle, "clean" # even if we have nothing to install, we may have removed gems
true
else
message = <<~EOS
failed to run `#{bundle} clean`!
EOS
if only_warn_on_failure
opoo_if_defined message
else
odie_if_defined message
end
false
end

if bundle_installed
Expand Down