From f10f44acf5e070faf06eb43f6a9d00a7fe73f977 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Tue, 20 Aug 2019 18:10:44 -0700 Subject: [PATCH] fix: trim branch name before comparing to master (#19853) --- script/lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/utils.js b/script/lib/utils.js index e7311f7cc14a..2958c50e9b84 100644 --- a/script/lib/utils.js +++ b/script/lib/utils.js @@ -49,7 +49,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)