about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-01-06 11:25:31 -0600
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-01-06 11:25:31 -0600
commitd1d7ce4b70388137b8c74b822efa0324199e9727 (patch)
treefdac0ba373316a7dff8690818ccb5350151ee842
parentc16eedfa97f7dfbf0a217d9dee2e210d1c51c7ed (diff)
downloadgenenetwork3-d1d7ce4b70388137b8c74b822efa0324199e9727.tar.gz
Extend/modify the envvars rather than overriding
If env is provided for subprocess.Popen() or subprocess.run()
functions, those are used rather than what is inherited from the
parent process. We, thus, need to extend the parent process'
environment for the command rather than replacing it in its entirety.

This commit fixes that.
-rw-r--r--gn3/api/correlation.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py
index 3667a24..f51ec4c 100644
--- a/gn3/api/correlation.py
+++ b/gn3/api/correlation.py
@@ -1,4 +1,5 @@
 """Endpoints for running correlations"""
+import os
 import sys
 import logging
 from functools import reduce
@@ -144,6 +145,7 @@ def partial_correlation():
             job_queue=compute_job_queue(current_app),
             options={
                 "env": {
+                    **os.environ,
                     "PYTHONPATH": ":".join(sys.path),
                     "SQL_URI": current_app.config["SQL_URI"]
                 },