roelfie / dotfiles

Repository containing my macOS dotfiles (and much more)
3 stars 0 forks source link

'brew upgrade' tells me to 'configure an askpass helper' #20

Open roelfie opened 2 years ago

roelfie commented 2 years ago

Bookkeeper https://github.com/roelfie/dotfiles/blob/09027e22054d85b962d12cf024bb0664ac3f1330/bookkeeper/dotfiles_bookkeeper.zsh#L107 refuses to upgrade certain casks because sudo requires a password.

Exact error message (see bookkeeper logs):

==> Uninstalling packages; your password may be necessary:
com.1password.op
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
roelfie commented 2 years ago

As a result some casks haven't been upgraded for a while:

$ brew outdated
1password-cli (2.5.1) != 2.7.0
oracle-jdk (18.0.1.1) != 18.0.2.1
roelfie commented 2 years ago

Trying to configure the launchd / launchcontrol job to run under root is of no use: Brew upgrade no longer allows execution under root.

So trying to pass in my password using 1password cli to the bookkeeper / brew upgrade command also seems a dead end.

For now I'm simple running "brew upgrade" manually now and then.

One feature we could add is showing a notification if the bookkeeper detects that certain packages could not be upgraded (telling me to run 'brew upgrade' manually). But I yet have to find out how to detect that there were failures in the output of 'brew upgrade'.