From 4e7cd23a3bed3a1c35d0423b0558fd8622c0333d Mon Sep 17 00:00:00 2001 From: Opportunity Date: Tue, 7 Jul 2020 17:33:11 +0800 Subject: [PATCH] fix --- .github/workflows/checkin.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checkin.yml b/.github/workflows/checkin.yml index 4b342a0..bcf5d0a 100644 --- a/.github/workflows/checkin.yml +++ b/.github/workflows/checkin.yml @@ -21,7 +21,9 @@ jobs: - name: "check for uncommitted changes" # Ensure no changes run: | - git add . && git diff --exit-code --stat \ - || (echo "##[error] found changed files after build. please 'yarn build && npm run format'" \ - "and check in all changes" \ - && exit 1) + git add . + if git diff --cached --stat --exit-code; then + else + echo "##[error] Found changed files after build. Please 'yarn build && npm run format' and check in all changes." + exit 1 + fi \ No newline at end of file