Verified Commit b612f42e authored by Aral Balkan's avatar Aral Balkan
Browse files

Remove newline and trim git branch output

parent 804863e8
......@@ -67,7 +67,7 @@ if (commandLineOptions.deploy) {
// Ensure that we are on the master branch.
// (Deployments are only allowed from the master branch.)
const gitBranch = childProcess.execSync('git branch --show-current', {env: process.env, cwd: mainSourceDirectory})
const gitBranch = (childProcess.execSync('git branch --show-current', {env: process.env, cwd: mainSourceDirectory})).replace(/\n/g, '').trim()
if (gitBranch !== 'master') {
console.log(`❌ Error: Refusing to deploy non-master (${gitBranch}) branch.\n`)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment