aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/cleanup.rb2
-rw-r--r--Library/Homebrew/cmd/diy.rb2
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
-rw-r--r--Library/Homebrew/cmd/gist-logs.rb6
-rw-r--r--Library/Homebrew/cmd/help.rb2
-rw-r--r--Library/Homebrew/cmd/info.rb2
-rw-r--r--Library/Homebrew/cmd/install.rb28
-rw-r--r--Library/Homebrew/cmd/link.rb2
-rw-r--r--Library/Homebrew/cmd/linkapps.rb2
-rw-r--r--Library/Homebrew/cmd/log.rb2
-rw-r--r--Library/Homebrew/cmd/search.rb2
-rw-r--r--Library/Homebrew/cmd/sh.rb16
-rw-r--r--Library/Homebrew/cmd/uninstall.rb4
-rw-r--r--Library/Homebrew/cmd/unlinkapps.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb26
-rw-r--r--Library/Homebrew/cmd/upgrade.rb2
16 files changed, 51 insertions, 51 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index d8f669e85..290b748de 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -38,7 +38,7 @@ module Homebrew
end
def report_unremovable_kegs
- ofail <<-EOS.undent
+ ofail <<~EOS
Could not cleanup old kegs! Fix your permissions on:
#{Cleanup.unremovable_kegs.join "\n "}
EOS
diff --git a/Library/Homebrew/cmd/diy.rb b/Library/Homebrew/cmd/diy.rb
index a8f6440df..3980b3d9e 100644
--- a/Library/Homebrew/cmd/diy.rb
+++ b/Library/Homebrew/cmd/diy.rb
@@ -43,7 +43,7 @@ module Homebrew
detected_name = basename[/(.*?)-?#{Regexp.escape(version)}/, 1] || basename
canonical_name = Formulary.canonical_name(detected_name)
- odie <<-EOS.undent if detected_name != canonical_name
+ odie <<~EOS if detected_name != canonical_name
The detected name #{detected_name.inspect} exists in Homebrew as an alias
of #{canonical_name.inspect}. Consider using the canonical name instead:
brew diy --name=#{canonical_name}
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index cca2dca03..7b1778e63 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -43,7 +43,7 @@ module Homebrew
out = checks.send(method)
next if out.nil? || out.empty?
if first_warning
- $stderr.puts <<-EOS.undent
+ $stderr.puts <<~EOS
#{Tty.bold}Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!#{Tty.reset}
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index 012121b08..45537602b 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -29,7 +29,7 @@ module Homebrew
files["00.config.out"] = { content: s.string }
files["00.doctor.out"] = { content: `brew doctor 2>&1` }
unless f.core_formula?
- tap = <<-EOS.undent
+ tap = <<~EOS
Formula: #{f.name}
Tap: #{f.tap}
Path: #{f.path}
@@ -47,7 +47,7 @@ module Homebrew
if ARGV.include?("--new-issue") || ARGV.switch?("n")
if GitHub.api_credentials_type == :none
- puts <<-EOS.undent
+ puts <<~EOS
You can create a new personal access token:
#{GitHub::ALL_SCOPES_URL}
and then set the new HOMEBREW_GITHUB_API_TOKEN as the authentication method.
@@ -64,7 +64,7 @@ module Homebrew
def brief_build_info(f)
build_time_str = f.logs.ctime.strftime("%Y-%m-%d %H:%M:%S")
- s = <<-EOS.undent
+ s = <<~EOS
Homebrew build logs for #{f.full_name} on #{OS_VERSION}
EOS
if ARGV.include?("--with-hostname")
diff --git a/Library/Homebrew/cmd/help.rb b/Library/Homebrew/cmd/help.rb
index a0c44854b..c85916f9b 100644
--- a/Library/Homebrew/cmd/help.rb
+++ b/Library/Homebrew/cmd/help.rb
@@ -1,4 +1,4 @@
-HOMEBREW_HELP = <<-EOS.unindent.freeze
+HOMEBREW_HELP = <<~EOS.freeze
Example usage:
brew search [TEXT|/REGEX/]
brew (info|home|options) [FORMULA...]
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 6ee24a7fa..83bb712ab 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -128,7 +128,7 @@ module Homebrew
"#{c.name}#{reason}"
end.sort!
unless conflicts.empty?
- puts <<-EOS.undent
+ puts <<~EOS
Conflicts with:
#{conflicts.join("\n ")}
EOS
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index ca8f29477..575dbc4b3 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -110,17 +110,17 @@ module Homebrew
ARGV.formulae.each do |f|
# head-only without --HEAD is an error
if !ARGV.build_head? && f.stable.nil? && f.devel.nil?
- raise <<-EOS.undent
- #{f.full_name} is a head-only formula
- Install with `brew install --HEAD #{f.full_name}`
+ raise <<~EOS
+ #{f.full_name} is a head-only formula
+ Install with `brew install --HEAD #{f.full_name}`
EOS
end
# devel-only without --devel is an error
if !ARGV.build_devel? && f.stable.nil? && f.head.nil?
- raise <<-EOS.undent
- #{f.full_name} is a devel-only formula
- Install with `brew install --devel #{f.full_name}`
+ raise <<~EOS
+ #{f.full_name} is a devel-only formula
+ Install with `brew install --devel #{f.full_name}`
EOS
end
@@ -150,12 +150,12 @@ module Homebrew
# sure --force flag is passed.
if f.outdated?
optlinked_version = Keg.for(f.opt_prefix).version
- onoe <<-EOS.undent
+ onoe <<~EOS
#{f.full_name} #{optlinked_version} is already installed
To upgrade to #{f.version}, run `brew upgrade #{f.name}`
EOS
else
- opoo <<-EOS.undent
+ opoo <<~EOS
#{f.full_name} #{f.pkg_version} is already installed
EOS
end
@@ -173,13 +173,13 @@ module Homebrew
msg = "#{f.full_name} #{installed_version} is already installed"
linked_not_equals_installed = f.linked_version != installed_version
if f.linked? && linked_not_equals_installed
- msg = <<-EOS.undent
+ msg = <<~EOS
#{msg}
The currently linked version is #{f.linked_version}
You can use `brew switch #{f} #{installed_version}` to link this version.
EOS
elsif !f.linked? || f.keg_only?
- msg = <<-EOS.undent
+ msg = <<~EOS
#{msg}, it's just not linked.
You can use `brew link #{f}` to link this version.
EOS
@@ -188,7 +188,7 @@ module Homebrew
elsif !f.any_version_installed? && old_formula = f.old_installed_formulae.first
msg = "#{old_formula.full_name} #{old_formula.installed_version} already installed"
if !old_formula.linked? && !old_formula.keg_only?
- msg = <<-EOS.undent
+ msg = <<~EOS
#{msg}, it's just not linked.
You can use `brew link #{old_formula.full_name}` to link this version.
EOS
@@ -197,7 +197,7 @@ module Homebrew
elsif f.migration_needed? && !ARGV.force?
# Check if the formula we try to install is the same as installed
# but not migrated one. If --force passed then install anyway.
- opoo <<-EOS.undent
+ opoo <<~EOS
#{f.oldname} already installed, it's just not migrated
You can migrate formula with `brew migrate #{f}`
Or you can force install it with `brew install #{f} --force`
@@ -283,7 +283,7 @@ module Homebrew
def check_ppc
case Hardware::CPU.type
when :ppc
- abort <<-EOS.undent
+ abort <<~EOS
Sorry, Homebrew does not support your computer's CPU architecture.
For PPC support, see: https://github.com/mistydemeo/tigerbrew
EOS
@@ -308,7 +308,7 @@ module Homebrew
def check_cellar
FileUtils.mkdir_p HOMEBREW_CELLAR unless File.exist? HOMEBREW_CELLAR
rescue
- raise <<-EOS.undent
+ raise <<~EOS
Could not create #{HOMEBREW_CELLAR}
Check you have permission to write to #{HOMEBREW_CELLAR.parent}
EOS
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 6c4b912e8..5afb19ed6 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -29,7 +29,7 @@ module Homebrew
keg_only = keg_only?(keg.rack)
if HOMEBREW_PREFIX.to_s == "/usr/local" && keg_only &&
keg.name.start_with?("openssl", "libressl")
- opoo <<-EOS.undent
+ opoo <<~EOS
Refusing to link: #{keg.name}
Linking keg-only #{keg.name} means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's #{keg.name}.
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb
index 8713b609e..e8d482529 100644
--- a/Library/Homebrew/cmd/linkapps.rb
+++ b/Library/Homebrew/cmd/linkapps.rb
@@ -19,7 +19,7 @@ module Homebrew
module_function
def linkapps
- opoo <<-EOS.undent
+ opoo <<~EOS
`brew linkapps` has been deprecated and will eventually be removed!
Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using
diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb
index 9323c762d..898e921ba 100644
--- a/Library/Homebrew/cmd/log.rb
+++ b/Library/Homebrew/cmd/log.rb
@@ -31,7 +31,7 @@ module Homebrew
end
if File.exist? "#{repo}/.git/shallow"
- opoo <<-EOS.undent
+ opoo <<~EOS
#{name} is a shallow clone so only partial output will be shown.
To get a full clone run:
git -C "#{git_cd}" fetch --unshallow
diff --git a/Library/Homebrew/cmd/search.rb b/Library/Homebrew/cmd/search.rb
index d0f85a858..4ba5247f1 100644
--- a/Library/Homebrew/cmd/search.rb
+++ b/Library/Homebrew/cmd/search.rb
@@ -87,7 +87,7 @@ module Homebrew
arg.include?(char) && !arg.start_with?("/")
end
end
- ohai <<-EOS.undent
+ ohai <<~EOS
Did you mean to perform a regular expression search?
Surround your query with /slashes/ to search locally by regex.
EOS
diff --git a/Library/Homebrew/cmd/sh.rb b/Library/Homebrew/cmd/sh.rb
index 69f329cb3..3fe5f3005 100644
--- a/Library/Homebrew/cmd/sh.rb
+++ b/Library/Homebrew/cmd/sh.rb
@@ -27,14 +27,14 @@ module Homebrew
end
ENV["PS1"] = 'brew \[\033[1;32m\]\w\[\033[0m\]$ '
ENV["VERBOSE"] = "1"
- puts <<-EOS.undent_________________________________________________________72
- Your shell has been configured to use Homebrew's build environment;
- this should help you build stuff. Notably though, the system versions of
- gem and pip will ignore our configuration and insist on using the
- environment they were built under (mostly). Sadly, scons will also
- ignore our configuration.
- When done, type `exit'.
- EOS
+ puts <<~EOS
+ Your shell has been configured to use Homebrew's build environment;
+ this should help you build stuff. Notably though, the system versions of
+ gem and pip will ignore our configuration and insist on using the
+ environment they were built under (mostly). Sadly, scons will also
+ ignore our configuration.
+ When done, type `exit'.
+ EOS
$stdout.flush
exec ENV["SHELL"]
end
diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb
index 4839ba1e0..f95b6c7bb 100644
--- a/Library/Homebrew/cmd/uninstall.rb
+++ b/Library/Homebrew/cmd/uninstall.rb
@@ -131,7 +131,7 @@ module Homebrew
class DeveloperDependentsMessage < DependentsMessage
def output
- opoo <<-EOS.undent
+ opoo <<~EOS
#{list reqs} #{are_required_by_deps}.
You can silence this warning with:
#{sample_command}
@@ -141,7 +141,7 @@ module Homebrew
class NondeveloperDependentsMessage < DependentsMessage
def output
- ofail <<-EOS.undent
+ ofail <<~EOS
Refusing to uninstall #{list reqs}
because #{they reqs} #{are_required_by_deps}.
You can override this and force removal with:
diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb
index 56dba3603..7f401aaeb 100644
--- a/Library/Homebrew/cmd/unlinkapps.rb
+++ b/Library/Homebrew/cmd/unlinkapps.rb
@@ -20,7 +20,7 @@ module Homebrew
module_function
def unlinkapps
- opoo <<-EOS.undent
+ opoo <<~EOS
`brew unlinkapps` has been deprecated and will eventually be removed!
Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks.
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index e3d3c10bb..98823a152 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -33,7 +33,7 @@ module Homebrew
# Use an extra newline and bold to avoid this being missed.
ohai "Homebrew has enabled anonymous aggregate user behaviour analytics."
- puts <<-EOS.undent
+ puts <<~EOS
#{Tty.bold}Read the analytics documentation (and how to opt-out) here:
#{Formatter.url("https://docs.brew.sh/Analytics.html")}#{Tty.reset}
@@ -167,7 +167,7 @@ module Homebrew
end
if @migration_failed
- opoo <<-EOS.undent
+ opoo <<~EOS
Failed to migrate #{legacy_cache} to
#{HOMEBREW_CACHE}. Please do so manually.
EOS
@@ -176,7 +176,7 @@ module Homebrew
FileUtils.rm_rf legacy_cache
if legacy_cache.exist?
FileUtils.touch migration_attempted_file
- opoo <<-EOS.undent
+ opoo <<~EOS
Failed to delete #{legacy_cache}.
Please do so manually.
EOS
@@ -191,7 +191,7 @@ module Homebrew
ohai "Migrating HOMEBREW_REPOSITORY (please wait)..."
unless HOMEBREW_PREFIX.writable_real?
- ofail <<-EOS.undent
+ ofail <<~EOS
#{HOMEBREW_PREFIX} is not writable.
You should change the ownership and permissions of #{HOMEBREW_PREFIX}
@@ -205,7 +205,7 @@ module Homebrew
new_homebrew_repository = Pathname.new "/usr/local/Homebrew"
new_homebrew_repository.rmdir_if_possible
if new_homebrew_repository.exist?
- ofail <<-EOS.undent
+ ofail <<~EOS
#{new_homebrew_repository} already exists.
Please remove it manually or uninstall and reinstall Homebrew into a new
location as the migration cannot be done automatically.
@@ -258,7 +258,7 @@ module Homebrew
end
unless unremovable_paths.empty?
- ofail <<-EOS.undent
+ ofail <<~EOS
Could not remove old HOMEBREW_REPOSITORY paths!
Please do this manually with:
sudo rm -rf #{unremovable_paths.join " "}
@@ -274,7 +274,7 @@ module Homebrew
begin
FileUtils.ln_s(src.relative_path_from(dst.parent), dst)
rescue Errno::EACCES, Errno::ENOENT
- ofail <<-EOS.undent
+ ofail <<~EOS
Could not create symlink at #{dst}!
Please do this manually with:
sudo ln -sf #{src} #{dst}
@@ -285,13 +285,13 @@ module Homebrew
link_completions_manpages_and_docs(new_homebrew_repository)
ohai "Migrated HOMEBREW_REPOSITORY to #{new_homebrew_repository}!"
- puts <<-EOS.undent
+ puts <<~EOS
Homebrew no longer needs to have ownership of /usr/local. If you wish you can
return /usr/local to its default ownership with:
sudo chown root:wheel #{HOMEBREW_PREFIX}
EOS
rescue => e
- ofail <<-EOS.undent
+ ofail <<~EOS
#{Tty.bold}Failed to migrate HOMEBREW_REPOSITORY to #{new_homebrew_repository}!#{Tty.reset}
The error was:
#{e}
@@ -309,7 +309,7 @@ module Homebrew
Utils::Link.link_manpages(repository, command)
Utils::Link.link_docs(repository, command)
rescue => e
- ofail <<-EOS.undent
+ ofail <<~EOS
Failed to link all completions, docs and manpages:
#{e}
EOS
@@ -449,7 +449,7 @@ class Reporter
next unless (HOMEBREW_PREFIX/"Caskroom"/new_name).exist?
new_tap = Tap.fetch(new_tap_name)
new_tap.install unless new_tap.installed?
- ohai "#{name} has been moved to Homebrew.", <<-EOS.undent
+ ohai "#{name} has been moved to Homebrew.", <<~EOS
To uninstall the cask run:
brew cask uninstall --force #{name}
EOS
@@ -480,14 +480,14 @@ class Reporter
system HOMEBREW_BREW_FILE, "prune"
ohai "brew cask install #{new_name}"
system HOMEBREW_BREW_FILE, "cask", "install", new_name
- ohai <<-EOS.undent
+ ohai <<~EOS
#{name} has been moved to Homebrew-Cask.
The existing keg has been unlinked.
Please uninstall the formula when convenient by running:
brew uninstall --force #{name}
EOS
else
- ohai "#{name} has been moved to Homebrew-Cask.", <<-EOS.undent
+ ohai "#{name} has been moved to Homebrew-Cask.", <<~EOS
To uninstall the formula and install the cask run:
brew uninstall --force #{name}
brew cask install #{new_name}
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index f1ce3c7da..de886ff3d 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -26,7 +26,7 @@ module Homebrew
Homebrew.perform_preinstall_checks
if ARGV.include?("--all")
- opoo <<-EOS.undent
+ opoo <<~EOS
We decided to not change the behaviour of `brew upgrade` so
`brew upgrade --all` is equivalent to `brew upgrade` without any other
arguments (so the `--all` is a no-op and can be removed).