Skip to content

Commit d4541d0

Browse files
pipeline error fix
1 parent 0f554fb commit d4541d0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/release-make-it-native.mjs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,19 @@ async function cloneDocsRepo() {
130130

131131
process.chdir(DOCS_REPO_NAME);
132132

133-
await git.addConfig("user.name", GIT_AUTHOR_NAME, false, "global");
134-
await git.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global");
133+
// Re-initialize simpleGit after chdir so it operates inside the cloned repo.
134+
const repoGit = simpleGit();
135+
136+
await repoGit.addConfig("user.name", GIT_AUTHOR_NAME, false, "global");
137+
await repoGit.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global");
135138

136139
// Add upstream remote and fetch so we can branch off the latest upstream/development.
137140
// This avoids including fork-only commits (e.g., sync.yml) in the PR.
138-
await git.addRemote(
141+
await repoGit.addRemote(
139142
"upstream",
140143
`https://github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git`
141144
);
142-
await git.fetch("upstream");
145+
await repoGit.fetch("upstream");
143146
}
144147

145148
async function checkoutLocalBranch(git) {

0 commit comments

Comments
 (0)