workflow: fix release script error handling

This commit is contained in:
Evan You 2024-08-06 21:14:18 +08:00
parent ae09d24f41
commit 13834c81ea
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ async function publishPackage(pkgName, version, additionalFlags) {
)
console.log(pico.green(`Successfully published ${pkgName}@${version}`))
} catch (/** @type {any} */ e) {
if (e.stderr.match(/previously published/)) {
if (e.message?.match(/previously published/)) {
console.log(pico.red(`Skipping already published: ${pkgName}`))
} else {
throw e