Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix gh auth conflict when GH_TOKEN is already set (#49556)

morgankrey2132c54abce7
diff --git a/.github/workflows/docs_suggestions.yml b/.github/workflows/docs_suggestions.yml
index be1229e5fec..df4807bd944 100644
--- a/.github/workflows/docs_suggestions.yml
+++ b/.github/workflows/docs_suggestions.yml
@@ -95,7 +95,8 @@ jobs:
id: analyze
run: |
# Ensure gh CLI is authenticated (GH_TOKEN may not be auto-detected)
- echo "$GH_TOKEN" | gh auth login --with-token
+ # Unset GH_TOKEN first to allow gh auth login to store credentials
+ echo "$GH_TOKEN" | (unset GH_TOKEN && gh auth login --with-token)
OUTPUT_FILE=$(mktemp)
@@ -268,7 +269,8 @@ jobs:
id: analyze
run: |
# Ensure gh CLI is authenticated (GH_TOKEN may not be auto-detected)
- echo "$GH_TOKEN" | gh auth login --with-token
+ # Unset GH_TOKEN first to allow gh auth login to store credentials
+ echo "$GH_TOKEN" | (unset GH_TOKEN && gh auth login --with-token)
OUTPUT_FILE=$(mktemp)