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

cleanup_before: clean /Library/Frameworks directory #916

Merged
merged 3 commits into from
Apr 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/tests/cleanup_before.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ def run!(args:)
end
elsif OS.mac?
delete_or_move Pathname.glob(HOMEBREW_CELLAR/"*")

frameworks_dir = Pathname("/Library/Frameworks")
%w[
Mono.framework
PluginManager.framework
Python.framework
R.framework
Xamarin.Android.framework
Xamarin.Mac.framework
Xamarin.iOS.framework
].each do |framework|
path = frameworks_dir/framework
test "sudo", "mv", path, HOMEBREW_TEMP if path.exist?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this use delete_or_move instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs sudo, unfortunately. Would you rather we refactor delete_or_move to use sudo when requested?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carlocab Might make sense but: up to you, no strong feelings other way!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

end
end
end

Expand Down
Loading