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

*casks: : Avoid using FileUtils#rm_rf, FileUtils#rm_f or Pathname#rmtree #179540

Merged
merged 6 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Casks/a/android-ndk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
].each { |link_name| binary shimscript, target: link_name }

uninstall_postflight do
FileUtils.rm_f("#{HOMEBREW_PREFIX}/share/android-ndk")
FileUtils.rm("#{HOMEBREW_PREFIX}/share/android-ndk")
end

# No zap stanza required
Expand Down
2 changes: 1 addition & 1 deletion Casks/a/android-sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
end

uninstall_postflight do
FileUtils.rm_f("#{HOMEBREW_PREFIX}/share/android-sdk")
FileUtils.rm("#{HOMEBREW_PREFIX}/share/android-sdk")
end

zap trash: "~/.android"
Expand Down
2 changes: 1 addition & 1 deletion Casks/f/flutter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

uninstall_postflight do
FileUtils.rm_f("#{HOMEBREW_PREFIX}/share/flutter")
FileUtils.rm("#{HOMEBREW_PREFIX}/share/flutter")
end

zap trash: "~/.flutter"
Expand Down
2 changes: 1 addition & 1 deletion Casks/m/minecraft-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
end

uninstall_preflight do
FileUtils.rm_f eula_file
FileUtils.rm(eula_file)
end

zap trash: config_dir
Expand Down
2 changes: 1 addition & 1 deletion Casks/w/wezterm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
if staged_subfolder
FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
FileUtils.rm_rf(staged_subfolder)
FileUtils.rm_r(staged_subfolder)
end
end

Expand Down
2 changes: 1 addition & 1 deletion Casks/w/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
staged_subfolder = staged_path.glob(["WezTerm-*", "wezterm-*"]).first
if staged_subfolder
FileUtils.mv(staged_subfolder/"WezTerm.app", staged_path)
FileUtils.rm_rf(staged_subfolder)
FileUtils.rm_r(staged_subfolder)
end
end

Expand Down
Loading