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

"brew upgrade" command errors out when run as a click_script #653

Open
Pe8er opened this issue Nov 11, 2024 · 0 comments
Open

"brew upgrade" command errors out when run as a click_script #653

Pe8er opened this issue Nov 11, 2024 · 0 comments

Comments

@Pe8er
Copy link

Pe8er commented Nov 11, 2024

I have a item/plugin that runs brew update && brew upgrade on click. Item code:

#!/usr/bin/env zsh

# Load global styles, colors and icons
source "$CONFIG_DIR/globalstyles.sh"

# Identify full path to brew, just in case
brew="$(which brew)"

brew=(
  "${notification_defaults[@]}"
  icon=$ICON_PACKAGE
  script="$PLUGIN_DIR/brew.sh"
  click_script="$brew update && $brew upgrade"
)

sketchybar --add item  brew right            \
           --set       brew "${brew[@]}"

Issue: when ran through Sketchybar, brew upgrade errors out when trying to download any package (it calls curl and stops). When I run brew upgrade from Terminal or a simple script file, it works.

I asked folks over at homebrew, we did some troubleshooting but nothing works so far, so I thought I'd ask here. Discussion over at homebrew:

https://github.com/orgs/Homebrew/discussions/5710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant