github_packages: odie on missing skopeo.

If `HOMEBREW_FORCE_HOMEBREW_ON_LINUX` is set then we don't want to
try to `brew install` or it will try and install from source (which
takes too long).
This commit is contained in:
Mike McQuaid 2021-04-02 17:29:52 +01:00
parent 38456848a7
commit 15beab1859
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -58,6 +58,8 @@ class GitHubPackages
HOMEBREW_PREFIX/"bin/skopeo", HOMEBREW_PREFIX/"bin/skopeo",
].compact.first ].compact.first
unless skopeo.exist? unless skopeo.exist?
odie "no `skoepeo` and HOMEBREW_FORCE_HOMEBREW_ON_LINUX is set!" if Homebrew::EnvConfig.force_homebrew_on_linux?
ohai "Installing `skopeo` for upload..." ohai "Installing `skopeo` for upload..."
safe_system HOMEBREW_BREW_FILE, "install", "--formula", "skopeo" safe_system HOMEBREW_BREW_FILE, "install", "--formula", "skopeo"
skopeo = Formula["skopeo"].opt_bin/"skopeo" skopeo = Formula["skopeo"].opt_bin/"skopeo"