diff --git a/Library/Homebrew/cask/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/artifact/abstract_uninstall.rb index 4773dc7982..7426e0f09d 100644 --- a/Library/Homebrew/cask/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/artifact/abstract_uninstall.rb @@ -389,7 +389,7 @@ module Cask end def uninstall_pkgutil(*pkgs, command: nil, **_) - ohai "Uninstalling packages with sudo; the password may be necessary:" + ohai "Uninstalling packages with `sudo` (which may request your password)..." pkgs.each do |regex| ::Cask::Pkg.all_matching(regex, command).each do |pkg| puts pkg.package_id diff --git a/Library/Homebrew/cask/artifact/pkg.rb b/Library/Homebrew/cask/artifact/pkg.rb index 7c4ce514a6..d3bef370e8 100644 --- a/Library/Homebrew/cask/artifact/pkg.rb +++ b/Library/Homebrew/cask/artifact/pkg.rb @@ -35,7 +35,7 @@ module Cask private def run_installer(command: nil, verbose: false, **_options) - ohai "Running installer for #{cask} with sudo; the password may be necessary." + ohai "Running installer for #{cask} with `sudo` (which may request your password)..." unless path.exist? pkg = path.relative_path_from(cask.staged_path) pkgs = Pathname.glob(cask.staged_path/"**"/"*.pkg").map { |path| path.relative_path_from(cask.staged_path) } diff --git a/Library/Homebrew/cask/staged.rb b/Library/Homebrew/cask/staged.rb index dbaa50a8f8..315e37a3ed 100644 --- a/Library/Homebrew/cask/staged.rb +++ b/Library/Homebrew/cask/staged.rb @@ -25,7 +25,7 @@ module Cask full_paths = remove_nonexistent(paths) return if full_paths.empty? - ohai "Changing ownership of paths required by #{@cask} with sudo; the password may be necessary." + ohai "Changing ownership of paths required by #{@cask} with `sudo` (which may request your password)..." @command.run!("/usr/sbin/chown", args: ["-R", "--", "#{user}:#{group}", *full_paths], sudo: true) end