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>
This commit is contained in:
Filipe Laíns 2020-08-13 15:45:58 +01:00 committed by Lukas Fleischer
parent 8c28ba6e7f
commit 83d228d9e8

View file

@ -11,6 +11,7 @@ configuration anyway.
import argparse import argparse
import atexit import atexit
import os import os
import os.path
import subprocess import subprocess
import sys import sys
import tempfile import tempfile
@ -87,6 +88,9 @@ def start():
return return
atexit.register(stop) atexit.register(stop)
if 'AUR_CONFIG' in os.environ:
os.environ['AUR_CONFIG'] = os.path.realpath(os.environ['AUR_CONFIG'])
try: try:
terminal_width = os.get_terminal_size().columns terminal_width = os.get_terminal_size().columns
except OSError: except OSError: