Skip to content

Commit

Permalink
pass current env to callshell
Browse files Browse the repository at this point in the history
  • Loading branch information
CTY-git committed Jan 21, 2025
1 parent cdf112c commit 68adbfa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion patchwork/steps/CallShell/CallShell.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
from __future__ import annotations

import os
import shlex
import subprocess
from pathlib import Path

from patchwork.common.utils.utils import mustache_render
from patchwork.logger import logger
from patchwork.step import Step, StepStatus
from patchwork.steps import CallSQL
from patchwork.steps.CallShell.typed import CallShellInputs, CallShellOutputs


Expand All @@ -24,7 +26,7 @@ def __parse_env_text(env_text: str) -> dict[str, str]:
env_spliter.whitespace_split = True
env_spliter.whitespace += ";"

env: dict[str, str] = dict()
env: dict[str, str] = os.environ.copy()
for env_assign in env_spliter:
env_assign_spliter = shlex.shlex(env_assign, posix=True)
env_assign_spliter.whitespace_split = True
Expand Down

0 comments on commit 68adbfa

Please sign in to comment.