on master help sign in
[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>

commita31cb68668f2c5b890dc973aeeb90ef2246099aa authorMarkus Heiser <markus.heiser@darmarit.de> dateMon 11 Jan 2021, 22:56 (6 years ago) parent4853a29
1 file changed+8−1
utils/build_env.py+8−1
utils/build_env.py+8−1
@@ -4,10 +4,17 @@
44
55# set path
66import sys
7−from os.path import realpath, dirname, join, sep
7+import os
8+from os.path import realpath, dirname, join, sep, abspath
9+
810repo_root = realpath(dirname(realpath(__file__)) + sep + '..')
911sys.path.insert(0, repo_root)
1012
13+# Under the assumption that a brand is always a fork assure that the settings
14+# file from reposetorie's working tree is used to generate the build_env, not
15+# from /etc/searx/settings.yml.
16+os.environ['SEARX_SETTINGS_PATH'] = abspath(dirname(__file__) + sep + 'settings.yml')
17+
1118from searx import brand
1219
1320name_val = [