From cc19a9a8b398477cfc90ef76d7913047a1dc2614 Mon Sep 17 00:00:00 2001 From: Ma Liming Date: Mon, 20 Oct 2025 09:27:15 +0800 Subject: [PATCH] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/auto-add-seo.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-add-seo.yml b/.github/workflows/auto-add-seo.yml index 8440585151..993196cb86 100644 --- a/.github/workflows/auto-add-seo.yml +++ b/.github/workflows/auto-add-seo.yml @@ -78,7 +78,10 @@ jobs: # Create directory if it doesn't exist mkdir -p "$(dirname "$file")" # Checkout the file from merge commit - git show "${{ github.event.pull_request.merge_commit_sha }}:$file" > "$file" 2>/dev/null || echo " Warning: Could not checkout $file" + if ! git show "${{ github.event.pull_request.merge_commit_sha }}:$file" > "$file" 2>err.log; then + echo " Warning: Could not checkout $file" + echo " Reason: $(cat err.log)" + fi fi done <<< "$FILES"