From 93b2ebb53b49f4c2ba84dcb9b7c98f58dc05ad46 Mon Sep 17 00:00:00 2001 From: Gustavo Henke Date: Sun, 3 Jun 2018 06:54:07 +1000 Subject: [PATCH] Trim and reference branch correctly during deployment (#716) Otherwise it may contain a trailing \n --- lib/publish-gh-pages.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/publish-gh-pages.js b/lib/publish-gh-pages.js index b41ec75192..b31146424e 100755 --- a/lib/publish-gh-pages.js +++ b/lib/publish-gh-pages.js @@ -19,7 +19,8 @@ if (!shell.which('git')) { const siteConfig = require(process.cwd() + '/siteConfig.js'); const GIT_USER = process.env.GIT_USER; const CURRENT_BRANCH = - process.env.CIRCLE_BRANCH || shell.exec('git rev-parse --abbrev-ref HEAD'); + process.env.CIRCLE_BRANCH || + shell.exec('git rev-parse --abbrev-ref HEAD').stdout.trim(); const ORGANIZATION_NAME = process.env.ORGANIZATION_NAME || process.env.CIRCLE_PROJECT_USERNAME ||