Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions content-scripts/updateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -772,11 +772,14 @@ const copyLatestDocsFromArchive = async ({

const newVersionExists = await fs.pathExists(newVersionDir);

// This used to throw an error instead of a warning. It will happen when a
// resource root did not have any updates in the latest version (e.g., the
// `casts` directory stopped existing after `v3.0.0`).
if (!newVersionExists) {
throw new Error(
"failed to copy latest because version does not exist:",
newVersion
console.warn(
`WARNING: cannot copy ${newVersion} at ${newVersionDir} (does not exist) to ${latestDir}`
);
return;
}

await fs.copy(newVersionDir, latestDir);
Expand Down