From 83d228d9e8c2b067dfd5565d22437363f7590d69 Mon Sep 17 00:00:00 2001 From: Filipe Laíns Date: Thu, 13 Aug 2020 15:45:58 +0100 Subject: spawn: expand AUR_CONFIG to the full path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows using a relative path for the config. PHP didn't play well with it. Signed-off-by: Filipe Laíns Signed-off-by: Lukas Fleischer --- aurweb/spawn.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit v1.2.3-24-g4f1b