summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipe Laíns <lains@archlinux.org>2020-08-13 16:45:58 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2021-02-20 17:25:21 +0100
commit83d228d9e8c2b067dfd5565d22437363f7590d69 (patch)
tree3f1b2c5fe1e72e01b5c3e1c39b787bd2714c9d08
parent8c28ba6e7f1c99f4b16c651857224b1d19f93466 (diff)
downloadaur-83d228d9e8c2b067dfd5565d22437363f7590d69.tar.gz
aur-83d228d9e8c2b067dfd5565d22437363f7590d69.tar.xz
spawn: expand AUR_CONFIG to the full path
This allows using a relative path for the config. PHP didn't play well with it. Signed-off-by: Filipe Laíns <lains@archlinux.org> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--aurweb/spawn.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/aurweb/spawn.py b/aurweb/spawn.py
index 46d534d9..3c5130d7 100644
--- a/aurweb/spawn.py
+++ b/aurweb/spawn.py
@@ -11,6 +11,7 @@ configuration anyway.
import argparse
import atexit
import os
+import os.path
import subprocess
import sys
import tempfile
@@ -87,6 +88,9 @@ def start():
return
atexit.register(stop)
+ if 'AUR_CONFIG' in os.environ:
+ os.environ['AUR_CONFIG'] = os.path.realpath(os.environ['AUR_CONFIG'])
+
try:
terminal_width = os.get_terminal_size().columns
except OSError: