Skip to content

Commit e089aaf

Browse files
authored
chore: warn instead of error when no linked repo found (#762)
Not everyone might be interested in having all repos locally linked up, and only care about locally syncing/updating specific repos at a time. That's currently not possible because the sync script error with a somewhat hard to understand error, because it can't find a certain repo. This adds a dedicated check and shows a warning instead of erroring.
1 parent 5b0d552 commit e089aaf

File tree

1 file changed

+5
-0
lines changed
  • apps/svelte.dev/scripts/sync-docs

1 file changed

+5
-0
lines changed

apps/svelte.dev/scripts/sync-docs/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ if (parsed.values.pull) {
167167
}
168168

169169
async function sync(pkg: Package) {
170+
if (!fs.existsSync(`${REPOS}/${pkg.name}/${pkg.docs}`)) {
171+
console.warn(`No linked repo found for ${pkg.name}`);
172+
return;
173+
}
174+
170175
const dest = `${DOCS}/${pkg.name}`;
171176

172177
fs.rmSync(dest, { force: true, recursive: true });

0 commit comments

Comments
 (0)