diff --git a/lib/config/utils.js b/lib/config/utils.js index 39be6c2ae..c42bbd89f 100644 --- a/lib/config/utils.js +++ b/lib/config/utils.js @@ -27,7 +27,7 @@ exports.toIntegerConfig = function toIntegerConfig (configValue) { exports.getGitCommit = function getGitCommit (repodir) { try { // prefer using git to get the current ref, as poking in .git is very fragile - return require('child_process').execSync('git rev-parse HEAD') + return require('child_process').execSync('git rev-parse HEAD').replace('\n', '') } catch (e) { // there was an error running git, try to parse refs ourselves if (!fs.existsSync(repodir + '/.git/HEAD')) {