diff --git a/remote_branch_checker/remote_branch_checker.sh b/remote_branch_checker/remote_branch_checker.sh index c155159..1c36898 100755 --- a/remote_branch_checker/remote_branch_checker.sh +++ b/remote_branch_checker/remote_branch_checker.sh @@ -456,7 +456,7 @@ echo "Info: Deleting excluded and unrelated files..." # Remove all the excluded (but .git and work) set -e for todelete in ${excluded}; do - if [[ ${todelete} =~ ".git" || ${todelete} =~ "work" || ${todelete} =~ "node_modules" ]]; then + if [[ ${todelete} =~ ".git" || ${todelete} =~ ^work/ || ${todelete} =~ "node_modules" ]]; then continue fi rm -fr "${WORKSPACE}/${todelete}"