Skip to content

Commit

Permalink
wip: inject step env into step execution env
Browse files Browse the repository at this point in the history
  • Loading branch information
berland committed Nov 18, 2024
1 parent c166243 commit 11961ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/_ert/forward_model_runner/forward_model_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,14 @@ def _open_file_handles(
return (stdin, stdout, stderr)

def _create_environment(self) -> Optional[Dict[str, str]]:
combined_environment = None
combined_environment: Optional[Dict[str, str]] = None
if environment := self.job_data.get("environment"):
combined_environment = {**os.environ, **environment}
if step_environment := self.job_data.get("env_pr_fm_step"):
if combined_environment is None:
combined_environment = {**os.environ, **step_environment}
else:
combined_environment = {**combined_environment, **step_environment}
return combined_environment

def _run(self) -> Generator[Start | Exited | Running | None]:
Expand Down

0 comments on commit 11961ab

Please sign in to comment.