Skip to content

Commit 9423f80

Browse files
AnsonhkgCopilot
andauthored
Update scripts/sync-version.mjs
Co-authored-by: Copilot <[email protected]> Signed-off-by: Anson <[email protected]>
1 parent 1bf5592 commit 9423f80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/sync-version.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@ async function main() {
4444
throw new Error(`Version not found in ${litClientPackageJsonPath}`);
4545
}
4646

47-
const versionFileContents = await readFile(versionFilePath, 'utf8');
47+
let versionFileContents;
48+
try {
49+
versionFileContents = await readFile(versionFilePath, 'utf8');
50+
} catch (err) {
51+
throw new Error(`Failed to read version file at ${versionFilePath}: ${err.message}`);
52+
}
4853
const match = versionFileContents.match(VERSION_EXPORT_PATTERN);
4954

5055
if (!match) {

0 commit comments

Comments
 (0)