Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] utils/build_env.py: make sure to always use searx/settings.yml

Markus Heisera31cb68668f2
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 = [