chore: fix branch trimming for blast-off releases (#18907)

This commit is contained in:
Shelley Vohr 2019-06-20 13:12:05 -07:00 committed by GitHub
parent 7e5ea179a1
commit 57c099d8b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = {