diff --git a/lib/lifecycles/bump.js b/lib/lifecycles/bump.js index 5050317f2..7db4524e3 100644 --- a/lib/lifecycles/bump.js +++ b/lib/lifecycles/bump.js @@ -13,6 +13,7 @@ const semver = require('semver'); const writeFile = require('../write-file'); const { resolveUpdaterObjectFromArgument } = require('../updaters'); let configsToUpdate = {}; +const sanitizeQuotesRegex = /['"]+/g; async function Bump(args, version) { // reset the cache of updated config files each @@ -37,7 +38,7 @@ async function Bump(args, version) { await runLifecycleScript(args, 'prerelease'); const stdout = await runLifecycleScript(args, 'prebump'); if (stdout?.trim().length) { - const prebumpString = stdout.trim(); + const prebumpString = stdout.trim().replace(sanitizeQuotesRegex, ''); if (semver.valid(prebumpString)) args.releaseAs = prebumpString; } if (!args.firstRelease) {