Skip to content

Commit

Permalink
Make manual installers easier to open.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Apr 16, 2023
1 parent 2816c12 commit 429e68e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Library/Homebrew/cask/artifact/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class Installer < AbstractArtifact
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, please
open #{cask.staged_path.join(path).to_s.shellescape}
to run the installer and complete the installation.
EOS
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/cask/artifact/installer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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

Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/test/cask/installer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@
<<~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, please
open #{with_installer_manual.staged_path.join("Caffeine.app")}
to run the installer and complete the installation.
🍺 with-installer-manual was successfully installed!
EOS
).to_stdout
Expand Down

0 comments on commit 429e68e

Please sign in to comment.