Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make manual installers easier to open. #15230

Merged
merged 1 commit into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Library/Homebrew/cask/artifact/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ 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. To run it and complete the installation:
open #{cask.staged_path.join(path).to_s.shellescape}
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 @@ -17,7 +17,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
5 changes: 2 additions & 3 deletions Library/Homebrew/test/cask/installer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,8 @@
<<~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
Expand Down