diff --git a/.github/workflows/sync_cmakebuild.yml b/.github/workflows/sync_cmakebuild.yml index fc07362742c2..d130ba61c9bf 100644 --- a/.github/workflows/sync_cmakebuild.yml +++ b/.github/workflows/sync_cmakebuild.yml @@ -37,9 +37,9 @@ jobs: conflicts_file=$(mktemp) git merge main --no-commit --no-ff main | true > $conflicts_file - git reset HEAD --hard - git clean -fd - if [ -s $conflicts_file ];then + git reset HEAD --hard > /dev/null + git clean -fd > /dev/null + if [ ! -s $conflicts_file ];then echo Conflicts detected, trying to remove referenced CMakeLists* files grep -E -o '\s\S*CMakeLists\S*\s' $conflicts_file | xargs rm git add .