File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,14 @@ installAutoPkg() {
114114 echo " ALERT: REQUIRES ADMIN RIGHTS - please enter account password"
115115 echo
116116 echo " ### Prompting for administrator credentials to install AutoPkg..."
117- /usr/bin/osascript -e ' do shell script "installer -pkg /tmp/autopkg-latest.pkg -target /" with administrator privileges'
117+ if [[ $native_prompt == " yes" ]]; then
118+ # Use native prompt if requested
119+ /usr/bin/osascript -e ' do shell script "installer -pkg /tmp/autopkg-latest.pkg -target /" with administrator privileges'
120+ else
121+ # Use sudo prompt
122+ echo " Please enter your administrator password to install AutoPkg."
123+ sudo installer -pkg /tmp/autopkg-latest.pkg -target /
124+ fi
118125
119126 autopkg_version=$( ${AUTOPKG} version)
120127
254261 case " $1 " in
255262 -f|--force) force_autopkg_update=" yes"
256263 ;;
264+ --prompt) native_prompt=" yes"
265+ ;;
257266 -b|--beta)
258267 force_autopkg_update=" yes"
259268 use_beta=" yes"
You can’t perform that action at this time.
0 commit comments