mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-20 02:28:10 +01:00
catch stderr when running git subprocess outside of a git repo.
This commit is contained in:
parent
8f1ae1646e
commit
4456dd6f59
@ -30,6 +30,13 @@ PREFER_SECURE_URLS = env.bool("LNBITS_FORCE_HTTPS", default=True)
|
||||
SERVICE_FEE = env.float("LNBITS_SERVICE_FEE", default=0.0)
|
||||
|
||||
try:
|
||||
LNBITS_COMMIT = subprocess.check_output(["git", "-C", LNBITS_PATH, "rev-parse", "HEAD"]).strip().decode("ascii")
|
||||
LNBITS_COMMIT = (
|
||||
subprocess.check_output(
|
||||
["git", "-C", LNBITS_PATH, "rev-parse", "HEAD"],
|
||||
stderr=subprocess.DEVNULL,
|
||||
)
|
||||
.strip()
|
||||
.decode("ascii")
|
||||
)
|
||||
except:
|
||||
LNBITS_COMMIT = "unknown"
|
||||
|
Loading…
Reference in New Issue
Block a user