Skip to content

Commit 44dc0fe

Browse files
gdtknightclaude
andcommitted
fix(ci): redirect clone_wiki log output to stderr
The clone_wiki() function's echo and git clone output was captured by the command substitution wiki_dir=$(clone_wiki), corrupting the directory path variable. Redirect informational output to stderr so only the directory name is returned via stdout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b9300a6 commit 44dc0fe

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/scripts/sync-wiki.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,18 @@ EOF
110110
clone_wiki() {
111111
local wiki_url="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.wiki.git"
112112
local wiki_dir="wiki-temp-$(date +%Y%m%d-%H%M%S)"
113-
113+
114114
if [ -n "$WIKI_REPO" ]; then
115115
wiki_url="$WIKI_REPO"
116116
fi
117-
118-
echo "Cloning wiki repository..."
119-
if ! git clone "$wiki_url" "$wiki_dir" 2>&1; then
120-
echo "::error::Failed to clone wiki repository"
121-
echo "Check: Wiki is enabled, GITHUB_TOKEN has wiki write permissions"
117+
118+
echo "Cloning wiki repository..." >&2
119+
if ! git clone "$wiki_url" "$wiki_dir" >&2 2>&1; then
120+
echo "::error::Failed to clone wiki repository" >&2
121+
echo "Check: Wiki is enabled, GITHUB_TOKEN has wiki write permissions" >&2
122122
return 1
123123
fi
124-
124+
125125
echo "$wiki_dir"
126126
}
127127

0 commit comments

Comments
 (0)