Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

Repeated Password Prompts with PowerShell #85706

Closed channyein87 closed 4 years ago

channyein87 commented 4 years ago

General troubleshooting steps

Description of issue

Everytime upgrading or uninstalling PowerShell, there is a repeated password prompts to continue and have to enter the password multiple times.

Command that failed

brew upgrade powershell
brew uninstall powershell
brew uninstall powershell --force
brew cask uninstall powershell --force --verbose --debug

Output of command with --force --verbose --debug

==> Uninstalling Cask powershell
==> Uninstalling packages:
com.microsoft.powershell
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Password:
Sorry, try again.
Password:
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Password:
Sorry, try again.
Password:
Password:
Sorry, try again.
Password:
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Password:
Password:
Sorry, try again.
Password:
Sorry, try again.
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
Password:
==> Purging files for version 7.0.2 of Cask powershell

Output of brew cask doctor

==> Homebrew Version
2.4.5
==> macOS
10.15.5
==> SIP
Enabled
==> Java
13.0.2
==> xattr issues
<NONE>
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3609 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (1547 casks)
==> Contents of $LOAD_PATH
/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-rspec-1.41.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.7.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/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/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.1/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.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/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
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/local/Homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/bash"

Output of brew tap

aws/tap
homebrew/cask
homebrew/cask-fonts
homebrew/core
teamookla/speedtest
warrensbox/tap
vitorgalvao commented 4 years ago

Cannot reproduce on a clean VM and this is a very popular cask with no further reports on the matter. The issue is on your side.

My guess would be that you’ve setup sudo to ask for the password every time, and as the cask may be needing it to remove every file, you get the repeated prompt. Nothing we can do about that.