hedgedoc/lib/config
David Mehren b719ce79db
Fix crash while getting current git commit
HedgeDoc crashed with
`uncaughtException: ENOENT: no such file or directory`
on startup, when `.git/ref/heads` did not contain
a file for the current branch. This seems to happen
regularly with current Git versions.

This fixes the crash by first trying to use the `git` executable for
getting the current commit SHA (before running our own parsing code)
and introducing a separate check to prevent accessing a nonexistent
file in `.git/ref/heads`.

Signed-off-by: David Mehren <git@herrmehren.de>
2021-08-14 16:08:55 +02:00
..
default.js Disable GA and Disqus in default CSP 2021-06-07 22:57:12 +02:00
defaultSSL.js Rename forgotten values 2018-03-26 20:15:45 +02:00
dockerSecret.js Add Google oauth variable: hostedDomain 2020-02-08 15:57:22 +08:00
enum.js refactor(config.js): Extract config file 2017-05-08 19:29:07 +08:00
environment.js Allow configuring Disqus & GA CSP with env vars 2021-06-07 22:57:12 +02:00
hackmdEnvironment.js Don't add new config option in hackmd compatibility layer 2021-01-23 16:20:03 +01:00
index.js Automatically enable protocolUseSSL when useSSL is set 2021-05-06 21:19:14 +02:00
oldDefault.js Remove pdf export code 2020-11-26 21:09:23 +01:00
oldEnvironment.js Fix eslint warnings 2019-05-31 00:30:29 +02:00
utils.js Fix crash while getting current git commit 2021-08-14 16:08:55 +02:00