exit if modified and notify user

neu5ron-patch-1
neu5ron 2020-01-10 11:26:59 -05:00
parent 4a1c913c5e
commit 24be101533
1 changed files with 4 additions and 0 deletions

View File

@ -343,10 +343,14 @@ check_github(){
if [[ -n $IS_MASTER_BEHIND ]]; then
echo "Current master branch ahead of remote branch, possibly modified. Exiting..." >> $LOGFILE 2>&1
echo -e "${WAR}${HELK_WARNING_TAG}${STD} Current install has been modified."
echo -e "${WAR}${HELK_WARNING_TAG}${STD} Please commit your changes using git and then re-run this script."
exit 1
fi
if [[ $REBUILD_NEEDED == 0 ]] && [[ -z $IS_MASTER_BEHIND ]]; then
echo "Repository misconfigured. Exiting..." >> $LOGFILE 2>&1
echo -e "${RED}${HELK_ERROR_TAG}${STD} Current repo is misconfigured."
echo -e "\nExiting script..."
exit 1
fi
else