Skip to content

Commit a5cb495

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

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/update-skills.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,19 @@ for (const { name, repo, src, dest } of mappings) {
3333
continue;
3434
}
3535
// eslint-disable-next-line no-console
36-
console.log(`[update-skills] Pulling ${name} from branch '${branch}'...`);
36+
console.log(`[update-skills] Updating ${name} from branch '${branch}'...`);
37+
// eslint-disable-next-line no-console
38+
console.warn(
39+
`[update-skills] Note: updating ${name} will move the nested repository HEAD and may mark the parent repository as modified if it is checked out as a submodule.`
40+
);
3741
// Abort any in-progress merge left from a previous failed pull
3842
try {
3943
execSync("git merge --abort", { cwd: repo, stdio: "pipe" });
4044
} catch {
4145
// No merge in progress — ignore
4246
}
43-
execSync(`git pull origin ${branch} --no-edit`, { cwd: repo, stdio: "inherit" });
47+
execSync(`git fetch origin ${branch}`, { cwd: repo, stdio: "inherit" });
48+
execSync("git checkout --detach FETCH_HEAD", { cwd: repo, stdio: "inherit" });
4449

4550
if (!existsSync(src)) {
4651
// eslint-disable-next-line no-console

0 commit comments

Comments
 (0)