Skip to content

Commit c13ddc0

Browse files
Update scripts/update-skills.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7dc0248 commit c13ddc0

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

scripts/update-skills.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,9 @@ for (const { name, repo, src, dest } of mappings) {
4646
execFileSync("git", ["submodule", "update", "--init", submodulePath], { cwd: root, stdio: "inherit" });
4747
}
4848
// eslint-disable-next-line no-console
49-
console.log(`[update-skills] Pulling ${name} from branch '${branch}'...`);
50-
// Abort any in-progress merge left from a previous failed pull
51-
try {
52-
execFileSync("git", ["merge", "--abort"], { cwd: repo, stdio: "pipe" });
53-
} catch {
54-
// No merge in progress — ignore
55-
}
56-
execFileSync("git", ["pull", "origin", branch, "--no-edit"], { cwd: repo, stdio: "inherit" });
49+
console.log(`[update-skills] Updating ${name} to branch '${branch}'...`);
50+
execFileSync("git", ["fetch", "origin", branch], { cwd: repo, stdio: "inherit" });
51+
execFileSync("git", ["checkout", "-B", branch, `origin/${branch}`], { cwd: repo, stdio: "inherit" });
5752

5853
if (!existsSync(src)) {
5954
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)