Commit 4d03d063 authored by KatolaZ's avatar KatolaZ

added checks for pending commits in switch and prepare

parent 1b34c049
......@@ -40,7 +40,7 @@ check_pending_commits(){
if [ "${IS_CLEAN}" = "0" ]; then
printf "There are uncommitted changes or untracked files present.\n\
Please commit your changes or ignore untracked files"
Please commit your changes or ignore untracked files\n"
exit ${ERR_STATUS}
fi
}
......@@ -196,6 +196,8 @@ handle_prepare(){
echo "Usage: d1h_prepare <suite>"
fi
check_pending_commits
SUITE=suites/$1
CUR_BRANCH=$(git branch | grep -E "^\*" | cut -d " " -f 2)
......@@ -229,6 +231,7 @@ EOF
handle_switch(){
check_git "$0"
check_pending_commits
if [ "$#" -le 0 ]; then
echo "Usage: d1h_switch <suite>"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment