From df620ad3ba16b3cd7cdd0e7cb8ff552c79cfe2f3 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 14 Apr 2023 20:07:01 +0200 Subject: [PATCH] Make manual installers easier to open. --- Library/Homebrew/cask/artifact/installer.rb | 5 ++--- Library/Homebrew/test/cask/artifact/installer_spec.rb | 2 +- Library/Homebrew/test/cask/installer_spec.rb | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/cask/artifact/installer.rb b/Library/Homebrew/cask/artifact/installer.rb index 95310713d5..69de947bea 100644 --- a/Library/Homebrew/cask/artifact/installer.rb +++ b/Library/Homebrew/cask/artifact/installer.rb @@ -18,9 +18,8 @@ module Cask module ManualInstaller def install_phase(**) puts <<~EOS - To complete the installation of Cask #{cask}, you must also - run the installer at: - #{cask.staged_path.join(path)} + Cask #{cask} only provides a manual installer. To run it and complete the installation: + open #{cask.staged_path.join(path).to_s.shellescape} EOS end end diff --git a/Library/Homebrew/test/cask/artifact/installer_spec.rb b/Library/Homebrew/test/cask/artifact/installer_spec.rb index d03d55fb6e..d1f689555e 100644 --- a/Library/Homebrew/test/cask/artifact/installer_spec.rb +++ b/Library/Homebrew/test/cask/artifact/installer_spec.rb @@ -17,7 +17,7 @@ describe Cask::Artifact::Installer, :cask do it "shows a message prompting to run the installer manually" do expect do installer.install_phase(command: command) - end.to output(%r{run the installer at:\s+#{staged_path}/installer}).to_stdout + end.to output(%r{open #{staged_path}/installer}).to_stdout end end diff --git a/Library/Homebrew/test/cask/installer_spec.rb b/Library/Homebrew/test/cask/installer_spec.rb index 9640e7f60f..1bfe81b09b 100644 --- a/Library/Homebrew/test/cask/installer_spec.rb +++ b/Library/Homebrew/test/cask/installer_spec.rb @@ -112,9 +112,8 @@ describe Cask::Installer, :cask do <<~EOS, ==> Downloading file://#{HOMEBREW_LIBRARY_PATH}/test/support/fixtures/cask/caffeine.zip ==> Installing Cask with-installer-manual - To complete the installation of Cask with-installer-manual, you must also - run the installer at: - #{with_installer_manual.staged_path.join("Caffeine.app")} + Cask with-installer-manual only provides a manual installer. To run it and complete the installation: + open #{with_installer_manual.staged_path.join("Caffeine.app")} 🍺 with-installer-manual was successfully installed! EOS ).to_stdout