More core files style updates

This commit is contained in:
Xu Cheng 2015-08-03 20:38:20 +08:00
parent 13d544e11e
commit d62095710f
5 changed files with 9 additions and 7 deletions

View File

@ -22,7 +22,7 @@ class Cleaner
# Get rid of any info 'dir' files, so they don't conflict at the link stage # Get rid of any info 'dir' files, so they don't conflict at the link stage
info_dir_file = @f.info + "dir" info_dir_file = @f.info + "dir"
if info_dir_file.file? and !@f.skip_clean? info_dir_file if info_dir_file.file? && !@f.skip_clean?(info_dir_file)
observe_file_removal info_dir_file observe_file_removal info_dir_file
end end

View File

@ -576,7 +576,7 @@ class Checks
end end
def check_xcode_select_path def check_xcode_select_path
if !MacOS::CLT.installed? and !File.file? "#{MacOS.active_developer_dir}/usr/bin/xcodebuild" if !MacOS::CLT.installed? && !File.file?("#{MacOS.active_developer_dir}/usr/bin/xcodebuild")
path = MacOS::Xcode.bundle_path path = MacOS::Xcode.bundle_path
path = "/Developer" if path.nil? || !path.directory? path = "/Developer" if path.nil? || !path.directory?
<<-EOS.undent <<-EOS.undent

View File

@ -60,7 +60,7 @@ module Homebrew
puts_columns(tap_results) puts_columns(tap_results)
count = local_results.length + tap_results.length count = local_results.length + tap_results.length
if count == 0 and !blacklisted? query if count == 0 && !blacklisted?(query)
puts "No formula found for #{query.inspect}." puts "No formula found for #{query.inspect}."
begin begin
GitHub.print_pull_requests_matching(query) GitHub.print_pull_requests_matching(query)

View File

@ -9,7 +9,7 @@ class Keg
each_install_name_for(file) do |bad_name| each_install_name_for(file) do |bad_name|
# Don't fix absolute paths unless they are rooted in the build directory # Don't fix absolute paths unless they are rooted in the build directory
next if bad_name.start_with? "/" and !bad_name.start_with? HOMEBREW_TEMP.to_s next if bad_name.start_with? "/" && !bad_name.start_with?(HOMEBREW_TEMP.to_s)
new_name = fixed_name(file, bad_name) new_name = fixed_name(file, bad_name)
change_install_name(bad_name, new_name, file) unless new_name == bad_name change_install_name(bad_name, new_name, file) unless new_name == bad_name

View File

@ -39,10 +39,12 @@ if OS.mac? && MacOS.version < :mavericks && MacOS.active_developer_dir == "/"
EOS EOS
end end
case HOMEBREW_PREFIX.to_s when "/", "/usr" case HOMEBREW_PREFIX.to_s
when "/", "/usr"
# it may work, but I only see pain this route and don't want to support it # it may work, but I only see pain this route and don't want to support it
abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}" abort "Cowardly refusing to continue at this prefix: #{HOMEBREW_PREFIX}"
end end
if OS.mac? and MacOS.version < "10.6" if OS.mac? and MacOS.version < "10.6"
abort <<-EOABORT.undent abort <<-EOABORT.undent
Homebrew requires Snow Leopard or higher. For Tiger and Leopard support, see: Homebrew requires Snow Leopard or higher. For Tiger and Leopard support, see: