Homebrew-cask: google-cloud-sdk broken

Created on 30 Oct 2020  Â·  15Comments  Â·  Source: Homebrew/homebrew-cask

Description of issue

Not sure if this is the right place for this but the google-cloud-sdk is broken under default situations. It broke when after installing [email protected] and is I tried reinstalling to fix and now it can't be installed. I'm pretty sure this is because of [email protected] being the default and linked python version and google-cloud-sdk not supporting it. I imagine it's fixable by having a dependency on 3.8 and setting up the install to use it. Not sure about the inner workings of brew and if you can have a formulae dep in a cask?

Command that failed

brew cask install google-cloud-sdk

Output of command with --verbose --debug

==> Cask::Installer#install
==> Printing caveats
==> Caveats
google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:

  for bash users
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc"
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc"

  for zsh users
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
    source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"

  for fish users
    set -g fish_user_paths "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc" $fish_user_paths

==> Cask::Installer#fetch
==> Downloading
==> Downloading https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.5.7\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.7\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location --silent --head --request GET https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz
Already downloaded: /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
/usr/bin/xattr -p com.apple.quarantine /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
==> /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz is quarantined
==> Downloaded to -> /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
tar tf /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
==> No SHA-256 checksum defined for Cask 'google-cloud-sdk', skipping verification.
==> Installing Cask google-cloud-sdk
==> Cask::Installer#stage
==> Extracting primary container
==> Using container class UnpackStrategy::Tar for /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
tar xof /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz -C /var/folders/rk/zfrg3gnx1tlgl807140d0yf12bxv1w/T/d20201029-37171-17ufxmi
cp -pR /var/folders/rk/zfrg3gnx1tlgl807140d0yf12bxv1w/T/d20201029-37171-17ufxmi/google-cloud-sdk/. /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk
chmod -Rf +w /var/folders/rk/zfrg3gnx1tlgl807140d0yf12bxv1w/T/d20201029-37171-17ufxmi
==> Verifying Gatekeeper status of /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
/usr/bin/xattr -p com.apple.quarantine /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
==> /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz is quarantined
==> Propagating quarantine from /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz to /usr/local/Caskroom/google-cloud-sdk/latest
/usr/bin/xattr -p com.apple.quarantine /Users/epitstick/Library/Caches/Homebrew/downloads/cda39f18c3069c1a4ac0cd5b1d91541af945cd331eba8443c58ec5c890343c0a--google-cloud-sdk.tar.gz
/usr/bin/xargs -0 -- /bin/chmod -h u\+w
/usr/bin/xargs -0 -- /usr/bin/xattr -w com.apple.quarantine 0181\;5f9b9942\;Homebrew\\x20Cask\;F9584720-EB9D-4206-AE74-1883AA954F89
==> Creating metadata directory /usr/local/Caskroom/google-cloud-sdk/.metadata/latest/20201030044330.325.
==> Creating metadata subdirectory /usr/local/Caskroom/google-cloud-sdk/.metadata/latest/20201030044330.325/Casks.
==> Installing artifacts
==> 7 artifact/s defined
#<SortedSet: {#<Cask::Artifact::Uninstall:0x00007fb906c4e250 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @directives={:delete=>"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk", :signal=>[]}>, #<Cask::Artifact::Installer:0x00007fb906c47d38 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @args={:must_succeed=>true, :sudo=>false, :args=>["--usage-reporting", "false", "--bash-completion", "false", "--path-update", "false", "--rc-path", "false", "--quiet"], :print_stdout=>true}, @path=#<Pathname:google-cloud-sdk/install.sh>>, #<Cask::Artifact::Binary:0x00007fb906c47860 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @source_string="google-cloud-sdk/bin/bq", @target_string="", @source=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bq>, @target=#<Pathname:/usr/local/bin/bq>>, #<Cask::Artifact::Binary:0x00007fb906c45f60 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @source_string="google-cloud-sdk/bin/docker-credential-gcloud", @target_string="", @source=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/docker-credential-gcloud>, @target=#<Pathname:/usr/local/bin/docker-credential-gcloud>>, #<Cask::Artifact::Binary:0x00007fb906c45038 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @source_string="google-cloud-sdk/bin/gcloud", @target_string="", @source=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud>, @target=#<Pathname:/usr/local/bin/gcloud>>, #<Cask::Artifact::Binary:0x00007fb906c44110 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @source_string="google-cloud-sdk/bin/git-credential-gcloud.sh", @target_string="", @source=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/git-credential-gcloud.sh>, @target=#<Pathname:/usr/local/bin/git-credential-gcloud.sh>>, #<Cask::Artifact::Binary:0x00007fb906c4f1c8 @cask=#<Cask::Cask:0x00007fb9061e25f0 @token="google-cloud-sdk", @sourcefile_path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb>, @tap=#<Tap:0x00007fb906182718 @user="Homebrew", @repo="cask", @name="homebrew/cask", @full_name="Homebrew/homebrew-cask", @path=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask>, @alias_table=nil, @alias_reverse_table=nil, @cask_dir=#<Pathname:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks>>, @block=#<Proc:0x00007fb9061e2528@/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/google-cloud-sdk.rb:1>, @default_config=#<Cask::Config:0x00007fb9061e27a8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @caskroom_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk>, @metadata_master_container_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/.metadata>, @config=#<Cask::Config:0x00007fb906c3cbb8 @explicit={}, @binarydir=#<Pathname:/usr/local/bin>>, @dsl=#<Cask::DSL:0x00007fb906c3c988 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @token="google-cloud-sdk", @version="latest", @sha256=:no_check, @url=#<URL:0x00007fb906c3c690 @uri=#<URI::HTTPS https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz>, @using=nil, @tag=nil, @branch=nil, @revisions=nil, @revision=nil, @trust_cert=nil, @cookies=nil, @referer=nil, @user_agent=:default, @data=nil, @specs={:user_agent=>:default}>, @name=["Google Cloud SDK"], @homepage="https://cloud.google.com/sdk/", @artifacts=#<SortedSet: {...}>, @staged_path=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest>, @caveats=#<Cask::DSL::Caveats:0x00007fb906c4dee0 @cask=#<Cask::Cask:0x00007fb9061e25f0 ...>, @command=SystemCommand, @built_in_caveats={}, @custom_caveats=["google-cloud-sdk is installed at /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk. Add your profile:\n\n  for bash users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc\"\n\n  for zsh users\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc\"\n    source \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc\"\n\n  for fish users\n    set -g fish_user_paths \"/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.fish.inc\" $fish_user_paths\n"]>, @language=nil>>, @source_string="google-cloud-sdk/bin/gsutil", @target_string="", @source=#<Pathname:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gsutil>, @target=#<Pathname:/usr/local/bin/gsutil>>}>
==> Installing artifact of class Cask::Artifact::Installer
==> Running installer script 'google-cloud-sdk/install.sh'
/usr/bin/env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/install.sh --usage-reporting false --bash-completion false --path-update false --rc-path false --quiet
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
    import bootstrapping
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module>
    import setup  # pylint:disable=g-import-not-at-top
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/setup.py", line 57, in <module>
    from googlecloudsdk.core.util import platforms
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
    from googlecloudsdk.core.util import importing
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
    import imp
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 23, in <module>
    from importlib import util
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/util.py", line 2, in <module>
    from . import abc
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/abc.py", line 17, in <module>
    from typing import Protocol, runtime_checkable
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 26, in <module>
    import re as stdlib_re  # Avoid confusion with the re we export.
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py", line 124, in <module>
    import enum
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
    spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'
==> Purging files for version latest of Cask google-cloud-sdk
Error: Failure while executing; `/usr/bin/env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/install.sh --usage-reporting false --bash-completion false --path-update false --rc-path false --quiet` exited with 1. Here's the output:
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
    import bootstrapping
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 32, in <module>
    import setup  # pylint:disable=g-import-not-at-top
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/bootstrapping/setup.py", line 57, in <module>
    from googlecloudsdk.core.util import platforms
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/__init__.py", line 23, in <module>
    from googlecloudsdk.core.util import importing
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/googlecloudsdk/core/util/importing.py", line 23, in <module>
    import imp
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 23, in <module>
    from importlib import util
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/util.py", line 2, in <module>
    from . import abc
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/abc.py", line 17, in <module>
    from typing import Protocol, runtime_checkable
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 26, in <module>
    import re as stdlib_re  # Avoid confusion with the re we export.
  File "/usr/local/Cellar/[email protected]/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/re.py", line 124, in <module>
    import enum
  File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/lib/third_party/enum/__init__.py", line 26, in <module>
    spec = importlib.util.find_spec('enum')
AttributeError: module 'importlib' has no attribute 'util'

/usr/local/Homebrew/Library/Homebrew/system_command.rb:192:in `assert_success!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:59:in `run!'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:35:in `run'
/usr/local/Homebrew/Library/Homebrew/system_command.rb:39:in `run!'
/usr/local/Homebrew/Library/Homebrew/cask/artifact/installer.rb:38:in `install_phase'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:220:in `block in install_artifacts'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/set.rb:777:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:213:in `install_artifacts'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:105:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:74:in `block in install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:73:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:73:in `install_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/install.rb:38:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:96:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:187:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:121:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:15:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:120:in `<main>'

Output of brew doctor --verbose

==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/sorbet-runtime-stub-0.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-sorbet-0.5.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.44.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.8.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.4/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Homebrew Version
2.5.7
==> macOS
10.15.7
==> SIP
Enabled
==> Java
N/A
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3695 casks)
Your system is ready to brew.

Output of brew tap

homebrew/bundle
homebrew/cask
homebrew/core
awaiting maintainer feedback

Most helpful comment

I see same issue.
I don't know if it's right way, but I was able to reinstall it below.

brew unlink [email protected]
brew unlink [email protected]
brew link [email protected]
brew cask install google-cloud-sdk

All 15 comments

Facing same issue

Cloud SDK requires Python. Supported versions are 3.5 to 3.8, and 2.7.9 or higher.

You have [email protected]

I am not sure if there is anything we can do about this since the [email protected] formula is keg-only and hence is not symlinked into /usr/local.

@vitorgalvao and @reitermarkus any suggestions?

The CLOUDSDK_PYTHON variable could be set to point at 3.8. I see env is already used during installation. I suspect the bins themselves could be patched to have the var set near the top. I think there are some options, I just don't know what is typical within homebrew.

In the Cask file if you replace the line:

executable: "google-cloud-sdk/install.sh",

with:

executable: "CLOUDSDK_PYTHON=/usr/bin/python google-cloud-sdk/install.sh",

so that it uses the macOS version of Python 2, does that work?

I see same issue.
I don't know if it's right way, but I was able to reinstall it below.

brew unlink [email protected]
brew unlink [email protected]
brew link [email protected]
brew cask install google-cloud-sdk

I think linking to 3.8 is the right way to go, just not sure about the best way to go about it. you have to force link 3.8 (at least that's how it is for me) and there are a number of formula that expect 3.9 and I think may cause breakage if you you unlink 3.9 and force link 3.8. I think you want the install to use CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/libexec/bin/python for install but what to do after that to force gcloud and the other bins using it is the questionable part. I'm not sure that if you install with the correct ENV variable it will stick with the bins. I'm guessing we'd either have to patch the scripts, which wouldn't be too hard, or maybe make shims that are installed in the path that just set the var and call the real bins. There are some other options too but the others I can think of right now require changing the ENV for the user at all times and seems messy.

If the maintainer or a "owner" of this project can chime in on what's normal or allowed I can probably come up with a PR. I just don't want to get started on something that won't have a chance of being accepted. I also don't know how deps work between normal formula and casks.

Here is what I would suggest:

Add a depends_on formula: "[email protected]" to the Cask file and a caveat explaining that you will need to set the environment variable CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/bin.

Let’s go with @miccal’s suggestion.

@xaocon please feel free to open a PR, thanks.

I tried doing this:

executable: "CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/libexec/bin/python google-cloud-sdk/install.sh",

...but got this error:

Error: Failure while executing; `/usr/bin/env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/libexec/bin/python\ google-cloud-sdk/install.sh --usage-reporting false --bash-completion false --path-update false --rc-path false --quiet` exited with 127. Here's the output:
env: --usage-reporting: No such file or directory

...which means that the whole executable argument is being treated as a single path, and so cannot embed environment variables.

Trying this instead:

  installer script: {
    executable: "CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/libexec/bin/python",
    args:       [
      "google-cloud-sdk/install.sh",
      "--usage-reporting", "false", "--bash-completion", "false", "--path-update", "false",
      "--rc-path", "false", "--quiet"
    ],
  }

...gives this error:

Error: Failure while executing; `/usr/bin/env PATH=/usr/local/bin:/usr/local/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin CLOUDSDK_PYTHON=/usr/local/opt/[email protected]/libexec/bin/python google-cloud-sdk/install.sh --usage-reporting false --bash-completion false --path-update false --rc-path false --quiet` exited with 127. Here's the output:
env: google-cloud-sdk/install.sh: No such file or directory

...which means env isn't resolving the relative path when there's another env-var arg before it, for some reason.

I don't know enough about the cask DSL to suggest another "hacky" alternative.

But as for non-hacky ones, it seems like ScriptInstaller could/should make use of an env map if one was found in the script map argument, merging into the one it builds in https://github.com/Homebrew/brew/blob/bf7fe45e8998e56e6690347a0192c454b8cb203b/Library/Homebrew/cask/artifact/installer.rb#L41-L43 . E.g.

  installer script: {
    executable: "google-cloud-sdk/install.sh",
    args:       [
      "--usage-reporting", "false", "--bash-completion", "false", "--path-update", "false",
      "--rc-path", "false", "--quiet"
    ],
    env: {
      "CLOUDSDK_PYTHON" => "/usr/local/opt/[email protected]/libexec/bin/python"
    }
  }

Not sure if anything else would ever use it, but it seems like an obvious "should have" feature of the DSL.

I think setting CLOUDSDK_PYTHON as an environment variable should be fine, so I think your last idea of using env would be a good way to fix this issue.

I think installer script accepting a map/hash of env variables that should be present makes a lot of sense and would have been a really helpful feature but I don't really know Ruby to implement.

It took a lot more learning about homebrew and the various DSLs than I thought to get this working. I went at it a couple of ways before I got to a somewhat hacky solution. I'm cleaning things up for a PR now.

I think it may be helpful to have a section in the docs about variables that are available in the Casks. There are some examples in the caveats stanza docs but it was hard to find and I'm not sure it's a complete list.

I think it might also be helpful to show caveats at the end of an install rather than at the beginning.

If anybody wants I can file issues for allowing env variables for the installer, showing caveats at the end of the install, or places I think docs could be improved.

Not sure if anything else would ever use it

Probably not.

but it seems like an obvious "should have" feature of the DSL.

No feature used by a single cask is a “should have”.

I think it might also be helpful to show caveats at the end of an install rather than at the beginning.

Some caveats require user action for a successful installation (like what we’re discussing). Showing them at the beginning makes sense. That said, I don’t feel strongly about it, I’m simply pointing out that we can’t make the change without checking its real impact.

I think it may be helpful to have a section in the docs about variables that are available in the Casks.

Fine with me. That’s welcome.

@tsutsu I kind of expected it to be an option too but when I looked there are only a couple of casks that require an ENV variable during installation and there are some hacky ways around the functionality not being there.

@tsutsu, it turns out the functionality exists, it just has to be done in postflight. Check out https://github.com/xaocon/homebrew-cask/blob/ab016641f5e90fb2d804674b28d0ffee92726142/Casks/google-cloud-sdk.rb#L15 if you want to see.

Was this page helpful?
0 / 5 - 0 ratings