From 57c099d8b847e072009f8253b5656fe5c9b7aaea Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Thu, 20 Jun 2019 13:12:05 -0700 Subject: [PATCH] chore: fix branch trimming for blast-off releases (#18907) --- script/lib/utils.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/script/lib/utils.js b/script/lib/utils.js index d016845d490e..cf6f1861349f 100644 --- a/script/lib/utils.js +++ b/script/lib/utils.js @@ -28,8 +28,7 @@ function getAbsoluteElectronExec () { async function handleGitCall (args, gitDir) { const details = await GitProcess.exec(args, gitDir) if (details.exitCode === 0) { - const output = details.stdout.replace(/^\*|\s+|\s+$/, '') - return output.trim() + return details.stdout.replace(/^\*|\s+|\s+$/, '') } else { const error = GitProcess.parseError(details.stderr) console.log(`${fail} couldn't parse git process call: `, error) @@ -48,7 +47,7 @@ async function getCurrentBranch (gitDir) { process.exit(1) } } - return branch + return branch.trim() } module.exports = {