Request user password

This commit is contained in:
Santiago Lo Coco 2022-01-09 19:53:43 -03:00
parent adc84b4cce
commit 86344fa21a
1 changed files with 3 additions and 1 deletions

View File

@ -88,7 +88,9 @@ loopThroughFiles() {
displayDialogBox --yesno "There are 'other' files, would you like to install them?\n\n${files}" || return
fi
sudo bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); runDetachedScript $dialogBox"
password=$(displayDialogBox --password "Enter your password" 3>&1 1>&2 2>&3)
echo $password | sudo -S bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); runDetachedScript $dialogBox"
unset password
}
runDetachedScript() {