diff --git a/tests/git-helper.sh b/tests/git-helper.sh index edf935886..734462689 100755 --- a/tests/git-helper.sh +++ b/tests/git-helper.sh @@ -17,10 +17,10 @@ function add_kata_bot_info() { } function rebase_atop_of_the_latest_target_branch() { - if [ -n "${TARGET_BRANCH}" ]; then + if [[ -n "${TARGET_BRANCH}" ]]; then echo "Rebasing atop of the latest ${TARGET_BRANCH}" - if ! git rebase origin/${TARGET_BRANCH}; then - if [ -n "${GITHUB_WORKSPACE}" ] ; then + if ! git rebase "origin/${TARGET_BRANCH}"; then + if [[ -n "${GITHUB_WORKSPACE}" ]] ; then echo "Rebase failed, cleaning up the local repository and exiting" cd "${GITHUB_WORKSPACE}"/.. sudo rm -rf "${GITHUB_WORKSPACE}"