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

This commit is contained in:
Samuel Attard 2019-08-20 18:10:44 -07:00 committed by Shelley Vohr
parent d258797d05
commit f10f44acf5

View file

@ -49,7 +49,7 @@ async function getCurrentBranch (gitDir) {
'--remote' '--remote'
], gitDir)).split('\n') ], 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) { if (!branch) {
console.log(`${fail} no release branch exists for this ref`) console.log(`${fail} no release branch exists for this ref`)
process.exit(1) process.exit(1)