Allow local modification acceptance prompt to be skipped when passing 'skip-prompt' as a parameter value to check_local_mods() function

This commit is contained in:
weslambert
2022-08-19 16:07:14 -04:00
committed by GitHub
parent 9a692288e2
commit f00d9074ff

View File

@@ -227,13 +227,13 @@ check_local_mods() {
echo ""
echo "To reference this list later, check $SOUP_LOG".
echo
if [[ -z $UNATTENDED ]]; then
if [[ -z $UNATTENDED ]] && ! [[ "${1}" == "skip-prompt" ]]; then
while true; do
read -p "Please review the local modifications shown above as they may cause problems during or after the update.
Would you like to proceed with the update anyway?
If so, type 'YES'. Otherwise, type anything else to exit SOUP." yn
If so, type 'YES'. Otherwise, type anything else to exit SOUP. " yn
case $yn in
[yY][eE][sS] ) echo "Local modifications accepted. Continuing..."; break;;
@@ -1405,7 +1405,7 @@ main() {
fi
echo "Checking for local modifications."
check_local_mods
check_local_mods skip-prompt
echo "Checking sudoers file."
check_sudoers