Skip to content

Commit

Permalink
Fix visibility modifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
dduugg committed Apr 17, 2023
1 parent 7fdd75a commit 52f7367
Showing 1 changed file with 36 additions and 37 deletions.
73 changes: 36 additions & 37 deletions Library/Homebrew/install.rb
Expand Up @@ -56,43 +56,6 @@ def check_prefix
end
end

def check_cpu
return unless Hardware::CPU.ppc?

odie <<~EOS
Sorry, Homebrew does not support your computer's CPU architecture!
For PowerPC Mac (PPC32/PPC64BE) support, see:
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
EOS
end
private_class_method :check_cpu

def attempt_directory_creation
Keg::MUST_EXIST_DIRECTORIES.each do |dir|
FileUtils.mkdir_p(dir) unless dir.exist?

# Create these files to ensure that these directories aren't removed
# by the Catalina installer.
# (https://github.com/Homebrew/brew/issues/6263)
keep_file = dir/".keepme"
FileUtils.touch(keep_file) unless keep_file.exist?
rescue
nil
end
end
private_class_method :attempt_directory_creation

def check_cc_argv(cc)
return unless cc

@checks ||= Diagnostic::Checks.new
opoo <<~EOS
You passed `--cc=#{cc}`.
#{@checks.please_create_pull_requests}
EOS
end
private_class_method :check_cc_argv

def install_formula?(
formula,
head: false,
Expand Down Expand Up @@ -360,6 +323,42 @@ def print_dry_run_dependencies(formula, dependencies, &block)
puts formula_names.join(" ")
end
end

private

def check_cc_argv(cc)
return unless cc

@checks ||= Diagnostic::Checks.new
opoo <<~EOS
You passed `--cc=#{cc}`.
#{@checks.please_create_pull_requests}
EOS
end

def attempt_directory_creation
Keg::MUST_EXIST_DIRECTORIES.each do |dir|
FileUtils.mkdir_p(dir) unless dir.exist?

# Create these files to ensure that these directories aren't removed
# by the Catalina installer.
# (https://github.com/Homebrew/brew/issues/6263)
keep_file = dir/".keepme"
FileUtils.touch(keep_file) unless keep_file.exist?
rescue
nil
end
end

def check_cpu
return unless Hardware::CPU.ppc?

odie <<~EOS
Sorry, Homebrew does not support your computer's CPU architecture!
For PowerPC Mac (PPC32/PPC64BE) support, see:
#{Formatter.url("https://github.com/mistydemeo/tigerbrew")}
EOS
end
end
end

Expand Down

0 comments on commit 52f7367

Please sign in to comment.