From 8baed211a704e980fc6049c5dc8acd4ed2405d2c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 8 Apr 2024 19:23:33 +0100 Subject: [PATCH] brew style --fix --- Library/Homebrew/cask/artifact/abstract_uninstall.rb | 2 +- Library/Homebrew/development_tools.rb | 2 +- Library/Homebrew/extend/os/linux/development_tools.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 2caff1b700..8cd40e7fe4 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -510,7 +510,7 @@ module Cask end # Directory counts as empty if it only contains a `.DS_Store`. - if children.include?(ds_store = resolved_path/".DS_Store") + if children.include?((ds_store = resolved_path/".DS_Store")) Utils.gain_permissions_remove(ds_store, command:) children.delete(ds_store) end diff --git a/Library/Homebrew/development_tools.rb b/Library/Homebrew/development_tools.rb index e51496d597..b9976befff 100644 --- a/Library/Homebrew/development_tools.rb +++ b/Library/Homebrew/development_tools.rb @@ -12,7 +12,7 @@ class DevelopmentTools # Give the name of the binary you look for as a string to this method # in order to get the full path back as a Pathname. (@locate ||= {}).fetch(tool) do |key| - @locate[key] = if File.executable?(path = "/usr/bin/#{tool}") + @locate[key] = if File.executable?((path = "/usr/bin/#{tool}")) Pathname.new path # Homebrew GCCs most frequently; much faster to check this before xcrun elsif (path = HOMEBREW_PREFIX/"bin/#{tool}").executable? diff --git a/Library/Homebrew/extend/os/linux/development_tools.rb b/Library/Homebrew/extend/os/linux/development_tools.rb index c9d04a4830..49f34e3840 100644 --- a/Library/Homebrew/extend/os/linux/development_tools.rb +++ b/Library/Homebrew/extend/os/linux/development_tools.rb @@ -13,7 +13,7 @@ class DevelopmentTools glibc_path elsif (homebrew_path = HOMEBREW_PREFIX/"bin/#{tool}").executable? homebrew_path - elsif File.executable?(system_path = "/usr/bin/#{tool}") + elsif File.executable?((system_path = "/usr/bin/#{tool}")) Pathname.new system_path end end