Skip to content

Commit

Permalink
fixup non existing pacakge check
Browse files Browse the repository at this point in the history
  • Loading branch information
wernst committed Jul 24, 2023
1 parent a8877d3 commit 36507ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/npm-check-version-and-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ function getPublishedVersion() {
return semver.maxSatisfying(publishedVersions, '*'); // gets the highest version using semver
} catch (e) {
// Catch 404 which has no published version
if (e.output[1].toString('utf-8').includes('404 (Not Found)')) {
if (
e.output[1]
.toString('utf-8')
.includes('The remote server failed to provide the requested resource')
) {
return undefined;
}
throw e;
Expand Down

0 comments on commit 36507ae

Please sign in to comment.