Refactor macdeploycheck formula to use direct script installation and improve error handling in install_brew_deps.sh
This commit updates the `macdeploycheck` formula to install the script directly from the tapped repository, ensuring consistency with the tapped revision. Additionally, the `install_brew_deps.sh` script is modified to provide clearer error messages when loading formulae fails, enhancing the overall user experience during dependency checks.
This commit is contained in:
@@ -2,16 +2,16 @@ class Macdeploycheck < Formula
|
||||
desc "Sanity checks a macOS .app bundle for accidental Homebrew runtime dependencies"
|
||||
homepage "https://github.com/strawberrymusicplayer/strawberry"
|
||||
version "0.1.0"
|
||||
# Homebrew requires a URL stanza. Use the script shipped in this tap (file://),
|
||||
# so installs always match the tapped revision.
|
||||
url "file://#{File.expand_path("../../dist/macos/macdeploycheck.sh", __dir__)}"
|
||||
sha256 :no_check
|
||||
license "MIT"
|
||||
|
||||
depends_on :macos
|
||||
|
||||
def install
|
||||
# Install the script from the tapped repo working tree.
|
||||
# (__dir__ is .../Formula, so ../.. is the tap root)
|
||||
script = File.expand_path("../../dist/macos/macdeploycheck.sh", __dir__)
|
||||
bin.install script => "macdeploycheck"
|
||||
bin.install "macdeploycheck.sh" => "macdeploycheck"
|
||||
end
|
||||
|
||||
test do
|
||||
|
||||
Reference in New Issue
Block a user