Skip to content

Commit d68b0c6

Browse files
committed
Added anchor to regex
1 parent b0d50c1 commit d68b0c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/bump/bump-utils.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export async function getLatestCommitHash({ repo, path = '', source = 'github',
113113
export async function isValidResource({ resURL, verbose = true } = {}) {
114114
if (!resURL) throw new Error(`'resURL' option required by isValidResource()`)
115115
try {
116-
const resIsValid = !/Failed to fetch|Package size exceeded/.test(await (await fetch(resURL)).text())
116+
const resIsValid = !/^(?:Failed to fetch|Package size exceeded)/.test(await (await fetch(resURL)).text())
117117
if (verbose) this.log[resIsValid ? 'info' : 'error'](
118118
`\n${ resIsValid ? 'V' : 'Inv' }alid resource: ${resURL}\n`)
119119
return resIsValid

0 commit comments

Comments
 (0)