Skip to content

Commit

Permalink
build/change-version.js: fix wrong map usage (#35395)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Nov 24, 2021
1 parent 58ffe23 commit fa33e83
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/change-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ async function replaceRecursively(file, oldVersion, newVersion) {
}

async function main(args) {
const [oldVersion, newVersion] = args
let [oldVersion, newVersion] = args

if (!oldVersion || !newVersion) {
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
Expand All @@ -66,7 +66,7 @@ async function main(args) {
}

// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
[oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)

try {
const files = await globby(GLOB, GLOBBY_OPTIONS)
Expand Down

0 comments on commit fa33e83

Please sign in to comment.