Skip to content

Commit f5b641d

Browse files
committed
fix: relogin issue
1 parent b6f9a4a commit f5b641d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/release/module-automation/commons.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,10 @@ async function githubAuthentication(moduleInfo) {
204204
""
205205
)}`
206206
);
207-
await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`);
207+
// gh CLI will use GH_TOKEN environment variable if set, otherwise authenticate via stdin
208+
if (!process.env.GH_TOKEN) {
209+
await execShellCommand(`echo "${process.env.GH_PAT}" | gh auth login --with-token`);
210+
}
208211
}
209212

210213
async function cloneRepo(githubUrl, localFolder, branchName = "main") {

0 commit comments

Comments
 (0)