hedgedoc/lib
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
..
config Fix crash while getting current git commit 2021-08-14 16:08:55 +02:00
migrations Add missing catch 2020-12-02 19:39:06 +01:00
models Add help link and short explanation for failing migrations 2021-07-21 00:06:07 +02:00
ot Fix logging in ot module 2018-11-13 23:30:13 +01:00
web fix(s3): replace dash with dot for s3 endpoint 2021-08-04 16:09:08 +03:00
workers Linter: Fix all lint errors 2021-02-15 12:15:14 +01:00
csp.js Remove unsafe-eval from default CSP 2021-06-07 23:04:45 +02:00
errors.js Check for existing notes on POST and dont override them 2021-03-29 23:00:34 +02:00
history.js Linter: Fix all lint errors 2021-02-15 12:15:14 +01:00
letter-avatars.js Linter: Fix all lint errors 2021-02-15 12:15:14 +01:00
logger.js Fix eslint warnings 2019-05-31 00:30:29 +02:00
prometheus.js Add custom prometheus metrics 2021-04-25 20:06:56 +02:00
realtime.js Linter: Fix all lint errors 2021-02-15 12:15:14 +01:00
response.js Replace request library with node-fetch 2021-03-12 22:27:49 +01:00
utils.js Exclude /metrics and /status routes from session initialization 2021-07-20 23:56:54 +02:00