Skip to content

Commit

Permalink
Merge pull request #1284 from pyiron/subprocess_env_bug
Browse files Browse the repository at this point in the history
Enforce environment for subprocess
  • Loading branch information
jan-janssen authored Jan 12, 2024
2 parents 75230b2 + 107c947 commit bf12a95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyiron_base/jobs/job/runfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ def run_job_with_runmode_srun(job):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True,
env=os.environ.copy(),
)


Expand Down Expand Up @@ -641,6 +642,7 @@ def execute_job_with_external_executable(job):
stderr=subprocess.STDOUT,
universal_newlines=True,
check=True,
env=os.environ.copy(),
).stdout
except subprocess.CalledProcessError as e:
out, job_crashed = handle_failed_job(job=job, error=e)
Expand Down
1 change: 1 addition & 0 deletions pyiron_base/jobs/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def worker_function(args):
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
universal_newlines=True,
env=os.environ.copy(),
)
except subprocess.CalledProcessError:
pass
Expand Down

0 comments on commit bf12a95

Please sign in to comment.