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 module ManualInstaller
def install_phase(**) def install_phase(**)
puts <<~EOS puts <<~EOS
To complete the installation of Cask #{cask}, you must also Cask #{cask} only provides a manual installer. To run it and complete the installation:
run the installer at: open #{cask.staged_path.join(path).to_s.shellescape}
#{cask.staged_path.join(path)}
EOS EOS
end end
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 it "shows a message prompting to run the installer manually" do
expect do expect do
installer.install_phase(command: command) 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
end end

View File

@ -112,9 +112,8 @@ describe Cask::Installer, :cask do
<<~EOS, <<~EOS,
==> Downloading file://#{HOMEBREW_LIBRARY_PATH}/test/support/fixtures/cask/caffeine.zip ==> Downloading file://#{HOMEBREW_LIBRARY_PATH}/test/support/fixtures/cask/caffeine.zip
==> Installing Cask with-installer-manual ==> Installing Cask with-installer-manual
To complete the installation of Cask with-installer-manual, you must also Cask with-installer-manual only provides a manual installer. To run it and complete the installation:
run the installer at: open #{with_installer_manual.staged_path.join("Caffeine.app")}
#{with_installer_manual.staged_path.join("Caffeine.app")}
🍺 with-installer-manual was successfully installed! 🍺 with-installer-manual was successfully installed!
EOS EOS
).to_stdout ).to_stdout