mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-29 06:14:20 -05:00
Merge pull request #1546 from hedgedoc/fix/git_parsing
Fix unescaped line break in `git` output
This commit is contained in:
commit
ed8119d314
1 changed files with 1 additions and 1 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Reference in a new issue