diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-01-11 22:56:15 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-01-11 22:56:15 +0100 |
commit | a31cb68668f2c5b890dc973aeeb90ef2246099aa (patch) | |
tree | c73f83309060c0fd51ece49a0d39d9af73423c70 | |
parent | 4853a2980322ccd84597a6502dce3ca7f5c76af0 (diff) | |
download | searxng-a31cb68668f2c5b890dc973aeeb90ef2246099aa.tar.gz searxng-a31cb68668f2c5b890dc973aeeb90ef2246099aa.zip |
[fix] utils/build_env.py: make sure to always use searx/settings.yml
ignore SEARX_SETTINGS_PATH
[1] https://github.com/searx/searx/pull/2408#pullrequestreview-565247895
Suggested-by: @dalf [1]
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rw-r--r-- | utils/build_env.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/utils/build_env.py b/utils/build_env.py index e7077dece..b99e457cf 100644 --- a/utils/build_env.py +++ b/utils/build_env.py @@ -4,10 +4,17 @@ # set path import sys -from os.path import realpath, dirname, join, sep +import os +from os.path import realpath, dirname, join, sep, abspath + repo_root = realpath(dirname(realpath(__file__)) + sep + '..') sys.path.insert(0, repo_root) +# Under the assumption that a brand is always a fork assure that the settings +# file from reposetorie's working tree is used to generate the build_env, not +# from /etc/searx/settings.yml. +os.environ['SEARX_SETTINGS_PATH'] = abspath(dirname(__file__) + sep + 'settings.yml') + from searx import brand name_val = [ |