diff options
| author | Markus Reiter | 2017-10-15 02:28:32 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-10-18 14:39:09 +0200 |
| commit | 9bee9ca5757d1c5f720787737fed6a534a620d72 (patch) | |
| tree | b1eed297d9eb169673d2ed308e5ef3ca3bb09d12 /Library/Homebrew/extend | |
| parent | 270b752f5d9d218bfbed6fe85b6974fa653fb25f (diff) | |
| download | brew-9bee9ca5757d1c5f720787737fed6a534a620d72.tar.bz2 | |
Use “squiggly” heredocs.
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/ENV/shared.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/development_tools.rb | 12 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/diagnostic.rb | 48 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/formula_cellar_checks.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/missing_formula.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/extend/string.rb | 2 |
10 files changed, 54 insertions, 54 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 63a0f3e40..d9da014f0 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -124,7 +124,7 @@ module HomebrewArgvExtension Keg.new(prefix) end rescue FormulaUnavailableError - raise <<-EOS.undent + raise <<~EOS Multiple kegs installed to #{rack} However we don't know which one you refer to. Please delete (with rm -rf!) all but one and then try again. diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb index 15488ee19..5a6b779d0 100644 --- a/Library/Homebrew/extend/ENV/shared.rb +++ b/Library/Homebrew/extend/ENV/shared.rb @@ -233,7 +233,7 @@ module SharedEnvExtension if ARGV.include? "--default-fortran-flags" flags = FC_FLAG_VARS.reject { |key| self[key] } elsif values_at(*FC_FLAG_VARS).compact.empty? - opoo <<-EOS.undent + opoo <<~EOS No Fortran optimization information was provided. You may want to consider setting FCFLAGS and FFLAGS or pass the `--default-fortran-flags` option to `brew install` if your compiler is compatible with GCC. @@ -286,15 +286,15 @@ module SharedEnvExtension begin gcc_formula = gcc_version_formula(name) rescue FormulaUnavailableError => e - raise <<-EOS.undent - Homebrew GCC requested, but formula #{e.name} not found! + raise <<~EOS + Homebrew GCC requested, but formula #{e.name} not found! EOS end return if gcc_formula.opt_prefix.exist? - raise <<-EOS.undent - The requested Homebrew GCC was not installed. You must: - brew install #{gcc_formula.full_name} + raise <<~EOS + The requested Homebrew GCC was not installed. You must: + brew install #{gcc_formula.full_name} EOS end diff --git a/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb b/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb index 3fd847bc4..3553ada74 100644 --- a/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/extend/os/linux/requirements/osxfuse_requirement.rb @@ -18,7 +18,7 @@ class OsxfuseRequirement < Requirement def message msg = "libfuse is required to install this formula.\n" if libfuse_formula_exists? - msg + <<-EOS.undent + msg + <<~EOS Run "brew install libfuse" to install it. EOS else diff --git a/Library/Homebrew/extend/os/mac/development_tools.rb b/Library/Homebrew/extend/os/mac/development_tools.rb index 1931b398d..d37e778ca 100644 --- a/Library/Homebrew/extend/os/mac/development_tools.rb +++ b/Library/Homebrew/extend/os/mac/development_tools.rb @@ -24,18 +24,18 @@ class DevelopmentTools def installation_instructions if MacOS.version >= "10.9" - <<-EOS.undent + <<~EOS Install the Command Line Tools: xcode-select --install EOS elsif MacOS.version == "10.8" || MacOS.version == "10.7" - <<-EOS.undent + <<~EOS Install the Command Line Tools from https://developer.apple.com/download/more/ or via Xcode's preferences. EOS else - <<-EOS.undent + <<~EOS Install Xcode from https://developer.apple.com/download/more/ EOS @@ -44,19 +44,19 @@ class DevelopmentTools def custom_installation_instructions if MacOS.version > :leopard - <<-EOS.undent + <<~EOS Install GNU's GCC brew install gcc EOS elsif MacOS.version > :tiger - <<-EOS.undent + <<~EOS Install GNU's GCC brew install gcc@4.6 EOS else # Tiger doesn't ship with apple-gcc42, and this is required to build # some software that doesn't build properly with FSF GCC. - <<-EOS.undent + <<~EOS Install Apple's GCC brew install apple-gcc42 or GNU's GCC diff --git a/Library/Homebrew/extend/os/mac/diagnostic.rb b/Library/Homebrew/extend/os/mac/diagnostic.rb index 9f7b18b49..be0ce9351 100644 --- a/Library/Homebrew/extend/os/mac/diagnostic.rb +++ b/Library/Homebrew/extend/os/mac/diagnostic.rb @@ -41,7 +41,7 @@ module Homebrew return end - <<-EOS.undent + <<~EOS You are using macOS #{MacOS.version}. #{who} do not provide support for this #{what}. You may encounter build failures or other breakages. @@ -59,7 +59,7 @@ module Homebrew # Homebrew/brew is currently using. return if ENV["TRAVIS"] - message = <<-EOS.undent + message = <<~EOS Your Xcode (#{MacOS::Xcode.version}) is outdated. Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it). #{MacOS::Xcode.update_instructions} @@ -67,7 +67,7 @@ module Homebrew if OS::Mac.prerelease? current_path = Utils.popen_read("/usr/bin/xcode-select", "-p") - message += <<-EOS.undent + message += <<~EOS If #{MacOS::Xcode.latest_version} is installed, you may need to: sudo xcode-select --switch /Applications/Xcode.app Current developer directory is: @@ -87,7 +87,7 @@ module Homebrew # Homebrew/brew is currently using. return if ENV["TRAVIS"] - <<-EOS.undent + <<~EOS A newer Command Line Tools release is available. #{MacOS::CLT.update_instructions} EOS @@ -99,7 +99,7 @@ module Homebrew return unless MacOS.version == :el_capitan return unless MacOS::Xcode.version >= "8" - <<-EOS.undent + <<~EOS You have Xcode 8 installed without the CLT; this causes certain builds to fail on OS X El Capitan (10.11). Please install the CLT via: @@ -111,7 +111,7 @@ module Homebrew return unless MacOS::Xcode.installed? return unless MacOS::Xcode.below_minimum_version? - <<-EOS.undent + <<~EOS Your Xcode (#{MacOS::Xcode.version}) is too outdated. Please update to Xcode #{MacOS::Xcode.latest_version} (or delete it). #{MacOS::Xcode.update_instructions} @@ -122,7 +122,7 @@ module Homebrew return unless MacOS::CLT.installed? return unless MacOS::CLT.below_minimum_version? - <<-EOS.undent + <<~EOS Your Command Line Tools are too outdated. #{MacOS::CLT.update_instructions} EOS @@ -140,7 +140,7 @@ module Homebrew "Please install Xcode #{MacOS::Xcode.latest_version}." end - <<-EOS.undent + <<~EOS You seem to have osx-gcc-installer installed. Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and is an unlicensed distribution of really old Xcode files. @@ -154,7 +154,7 @@ module Homebrew uninstaller = Pathname.new("/Developer/Library/uninstall-developer-folder") return unless ((MacOS::Xcode.version || "0") >= "4.3") && uninstaller.exist? - <<-EOS.undent + <<~EOS You have leftover files from an older version of Xcode. You should delete them using: #{uninstaller} @@ -170,7 +170,7 @@ module Homebrew return if libs.empty? return if libs.include? "/usr/lib/libxcselect.dylib" - <<-EOS.undent + <<~EOS You have an outdated version of /usr/bin/install_name_tool installed. This will cause binary package installations to fail. This can happen if you install osx-gcc-installer or RailsInstaller. @@ -183,7 +183,7 @@ module Homebrew ponk = MacOS.macports_or_fink return if ponk.empty? - <<-EOS.undent + <<~EOS You have MacPorts or Fink installed: #{ponk.join(", ")} @@ -199,7 +199,7 @@ module Homebrew return if RUBY_VERSION == ruby_version return if ARGV.homebrew_developer? && OS::Mac.prerelease? - <<-EOS.undent + <<~EOS Ruby version #{RUBY_VERSION} is unsupported on #{MacOS.version}. Homebrew is developed and tested on Ruby #{ruby_version}, and may not work correctly on other Rubies. Patches are accepted as long as they don't cause breakage @@ -212,7 +212,7 @@ module Homebrew return if prefix.nil? return unless prefix.to_s.include?(" ") - <<-EOS.undent + <<~EOS Xcode is installed to a directory with a space in the name. This will cause some formulae to fail to build. EOS @@ -222,7 +222,7 @@ module Homebrew prefix = MacOS::Xcode.prefix return if prefix.nil? || prefix.exist? - <<-EOS.undent + <<~EOS The directory Xcode is reportedly installed to doesn't exist: #{prefix} You may need to `xcode-select` the proper path if you have moved Xcode. @@ -236,7 +236,7 @@ module Homebrew path = MacOS::Xcode.bundle_path path = "/Developer" if path.nil? || !path.directory? - <<-EOS.undent + <<~EOS Your Xcode is configured with an invalid path. You should change it to the correct path: sudo xcode-select -switch #{path} @@ -247,7 +247,7 @@ module Homebrew return unless MacOS.version <= "10.8" return if Formula["curl"].installed? - <<-EOS.undent + <<~EOS The system curl on 10.8 and below is often incapable of supporting modern secure connections & will fail on fetching formulae. @@ -261,7 +261,7 @@ module Homebrew return unless MacOS.version >= :yosemite return if ENV["SSL_CERT_DIR"].nil? - <<-EOS.undent + <<~EOS SSL_CERT_DIR support was removed from Apple's curl. If fetching formulae fails you should: unset SSL_CERT_DIR @@ -274,7 +274,7 @@ module Homebrew # license or no "xc*" tool will work. return unless `/usr/bin/xcrun clang 2>&1` =~ /license/ && !$CHILD_STATUS.success? - <<-EOS.undent + <<~EOS You have not agreed to the Xcode license. Builds will fail! Agree to the license by opening Xcode.app or running: sudo xcodebuild -license @@ -289,7 +289,7 @@ module Homebrew latest_version = Version.create(MacOS::XQuartz.latest_version) return if installed_version >= latest_version - <<-EOS.undent + <<~EOS Your XQuartz (#{installed_version}) is outdated. Please install XQuartz #{latest_version} (or delete the current version). XQuartz can be updated using Homebrew-Cask by running @@ -301,7 +301,7 @@ module Homebrew return unless MacOS::XQuartz.version return unless MacOS::XQuartz.version.include? "beta" - <<-EOS.undent + <<~EOS The following beta release of XQuartz is installed: #{MacOS::XQuartz.version} XQuartz beta releases include address sanitization, and do not work with @@ -337,7 +337,7 @@ module Homebrew end case_sensitive_vols.uniq! - <<-EOS.undent + <<~EOS The filesystem on #{case_sensitive_vols.join(",")} appears to be case-sensitive. The default macOS filesystem is case-insensitive. Please report any apparent problems. EOS @@ -346,7 +346,7 @@ module Homebrew def check_homebrew_prefix return if HOMEBREW_PREFIX.to_s == "/usr/local" - <<-EOS.undent + <<~EOS Your Homebrew's prefix is not /usr/local. You can install Homebrew anywhere you want but some bottles (binary packages) can only be used with a /usr/local prefix and some formulae (packages) @@ -360,7 +360,7 @@ module Homebrew mono_config = Pathname.new("/usr/bin/pkg-config") if mono_config.exist? && mono_config.realpath.to_s.include?("Mono.framework") - <<-EOS.undent + <<~EOS You have a non-Homebrew 'pkg-config' in your PATH: /usr/bin/pkg-config => #{mono_config.realpath} @@ -371,7 +371,7 @@ module Homebrew `sudo rm /usr/bin/pkg-config` and upgrade to the latest version of Mono. EOS elsif binary.to_s != "#{HOMEBREW_PREFIX}/bin/pkg-config" - <<-EOS.undent + <<~EOS You have a non-Homebrew 'pkg-config' in your PATH: #{binary} diff --git a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb index 32e5774f6..901d8945f 100644 --- a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb @@ -19,7 +19,7 @@ module FormulaCellarChecks return if files.empty? - <<-EOS.undent + <<~EOS Header files that shadow system header files were installed to "#{formula.include}" The offending files are: #{files * "\n "} @@ -35,7 +35,7 @@ module FormulaCellarChecks end return if system_openssl.empty? - <<-EOS.undent + <<~EOS object files were linked against system openssl These object files were linked against the deprecated system OpenSSL or the system's private LibreSSL. @@ -52,7 +52,7 @@ module FormulaCellarChecks end return if framework_links.empty? - <<-EOS.undent + <<~EOS python modules have explicit framework links These python extension modules were linked directly to a Python framework binary. They should be linked with -undefined dynamic_lookup @@ -67,13 +67,13 @@ module FormulaCellarChecks checker = LinkageChecker.new(keg, formula) return unless checker.broken_dylibs? - output = <<-EOS.undent + output = <<~EOS #{formula} has broken dynamic library links: #{checker.broken_dylibs.to_a * "\n "} EOS tab = Tab.for_keg(keg) if tab.poured_from_bottle - output += <<-EOS.undent + output += <<~EOS Rebuild this from source with: brew reinstall --build-from-source #{formula} If that's successful, file an issue#{formula.tap ? " here:\n #{formula.tap.issues_url}" : "."} diff --git a/Library/Homebrew/extend/os/mac/missing_formula.rb b/Library/Homebrew/extend/os/mac/missing_formula.rb index bcf0eb25d..ea6d50112 100644 --- a/Library/Homebrew/extend/os/mac/missing_formula.rb +++ b/Library/Homebrew/extend/os/mac/missing_formula.rb @@ -5,12 +5,12 @@ module Homebrew case name.downcase when "xcode" if MacOS.version >= :lion - <<-EOS.undent - Xcode can be installed from the App Store. + <<~EOS + Xcode can be installed from the App Store. EOS else - <<-EOS.undent - Xcode can be installed from #{Formatter.url("https://developer.apple.com/download/more/")}. + <<~EOS + Xcode can be installed from #{Formatter.url("https://developer.apple.com/download/more/")}. EOS end else diff --git a/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb b/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb index 8c898a272..3f10a951a 100644 --- a/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb +++ b/Library/Homebrew/extend/os/mac/requirements/osxfuse_requirement.rb @@ -26,7 +26,7 @@ class NonBinaryOsxfuseRequirement < Requirement satisfy(build_env: false) { HOMEBREW_PREFIX.to_s != "/usr/local" || !OsxfuseRequirement.binary_osxfuse_installed? } def message - <<-EOS.undent + <<~EOS osxfuse is already installed from the binary distribution and conflicts with this formula. EOS diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index e3d6880ba..b4c7ca959 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -403,7 +403,7 @@ class Pathname mkpath targets.each do |target| target = Pathname.new(target) # allow pathnames or strings - join(target.basename).write <<-EOS.undent + join(target.basename).write <<~EOS #!/bin/bash exec "#{target}" "$@" EOS @@ -415,9 +415,9 @@ class Pathname env_export = "" env.each { |key, value| env_export += "#{key}=\"#{value}\" " } dirname.mkpath - write <<-EOS.undent - #!/bin/bash - #{env_export}exec "#{target}" "$@" + write <<~EOS + #!/bin/bash + #{env_export}exec "#{target}" "$@" EOS end @@ -435,7 +435,7 @@ class Pathname # Writes an exec script that invokes a java jar def write_jar_script(target_jar, script_name, java_opts = "") mkpath - join(script_name).write <<-EOS.undent + join(script_name).write <<~EOS #!/bin/bash exec java #{java_opts} -jar #{target_jar} "$@" EOS diff --git a/Library/Homebrew/extend/string.rb b/Library/Homebrew/extend/string.rb index b96f12994..2e9e89b38 100644 --- a/Library/Homebrew/extend/string.rb +++ b/Library/Homebrew/extend/string.rb @@ -8,7 +8,7 @@ class String alias unindent undent # eg: - # if foo then <<-EOS.undent_________________________________________________________72 + # if foo then <<~EOS_________________________________________________________72 # Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do # eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad # minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip |
