Make manual installers easier to open.

This commit is contained in:
Markus Reiter 2023-04-14 20:07:01 +02:00
parent 498ce8d18f
commit df620ad3ba
No known key found for this signature in database
GPG Key ID: 245293B51702655B
3 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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