fix: trim branch name before comparing to master (#19856)

This commit is contained in:
trop[bot]
2019-08-20 20:11:52 -07:00
committed by Shelley Vohr
parent c2c0ee7a73
commit 3ca1cd4dd4

View File

@@ -47,7 +47,7 @@ async function getCurrentBranch (gitDir) {
'--remote'
], gitDir)).split('\n')
branch = branches.filter(b => b === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
branch = branches.filter(b => b.trim() === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
if (!branch) {
console.log(`${fail} no release branch exists for this ref`)
process.exit(1)