Honestpuck / homebrew.sh

Install homebrew via Jamf without giving users admin rights
Apache License 2.0
107 stars 30 forks source link

Running cask install script with password prompt error #16

Closed davidmarcantonio closed 2 years ago

davidmarcantonio commented 2 years ago

I've tried both brew install and brew cask scripts with a couple of applications that require a password during install. Here's what I get:

Script result: microsoft-word is either not installed or not available. Attempting installation... ==> Downloading https://officecdnmac.microsoft.com/pr/C1297A47-86C4-4C1F-97FA-950631F94777/MacAutoupdate/Microsoft_Word_16.61.22050700_Installer.pkg Already downloaded: /Users/username/Library/Caches/Homebrew/downloads/fab80e3beb26469b81f3240a95aebb6eb00185df6067410e127aa56bcaf8dc3f--Microsoft_Word_16.61.22050700_Installer.pkg All formula dependencies satisfied. ==> Installing Cask microsoft-word ==> Running installer for microsoft-word; your password may be necessary. Package installers may write to any location; options such as--appdirare ignored. 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 Error: Failure while executing;/usr/bin/sudo -E -- /usr/bin/env LOGNAME=username@company.com USER=username@company.com USERNAME=username@company.com /usr/sbin/installer -pkg /usr/local/Caskroom/microsoft-word/16.61.22050700/Microsoft_Word_16.61.22050700_Installer.pkg -target / -applyChoiceChangesXML /private/tmp/choices20220518-5376-bzn114.xmlexited with 1. Here's the output: 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 ==> Purging files for version 16.61.22050700 of Cask microsoft-word

Unsure on how to proceed. The account I'm testing with is set up correctly and can install an app using brew install --cask or brew install.

Honestpuck commented 2 years ago

I'm sorry but that is just a shortcoming of the method and not something easily fixed. I have considered figuring out how to use an askpass helper but have not done the work.