Skip to content

Commit 4270a56

Browse files
fix(update-skills): move repo existence check to prevent skipping updates
1 parent d116ddb commit 4270a56

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/update-skills.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ const mappings = [
3333
];
3434

3535
for (const { name, repo, src, dest } of mappings) {
36-
if (!existsSync(repo)) {
37-
// eslint-disable-next-line no-console
38-
console.warn(`[update-skills] Skipping ${name}: repo not found at ${repo}`);
39-
continue;
40-
}
4136
if (!existsSync(join(repo, ".git"))) {
4237
// Submodule directory exists but hasn't been initialized yet — initialize it now
4338
// eslint-disable-next-line no-console
4439
console.log(`[update-skills] Initializing submodule for ${name}...`);
4540
const submodulePath = relative(root, repo).replace(/\\/g, "/");
4641
execFileSync("git", ["submodule", "update", "--init", submodulePath], { cwd: root, stdio: "inherit" });
4742
}
43+
if (!existsSync(repo)) {
44+
// eslint-disable-next-line no-console
45+
console.warn(`[update-skills] Skipping ${name}: repo not found at ${repo}`);
46+
continue;
47+
}
4848
// eslint-disable-next-line no-console
4949
console.log(`[update-skills] Updating ${name} to branch '${branch}'...`);
5050
execFileSync("git", ["fetch", "origin", branch], { cwd: repo, stdio: "inherit" });

0 commit comments

Comments
 (0)