Skip to content

Commit 33b193c

Browse files
fix: make the env var of the child shell consistent with parent shell (#202)
Closes #185 * fix: make the env var of the child shell consistent with parent shell * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 06bc414 commit 33b193c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/swerex/runtime/local.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
import re
34
import shutil
45
import subprocess
@@ -159,7 +160,7 @@ async def start(self) -> CreateBashSessionResponse:
159160
encoding="utf-8",
160161
codec_errors="backslashreplace",
161162
echo=False,
162-
env={"PS1": self._ps1, "PS2": "", "PS0": ""}, # type: ignore
163+
env=dict(os.environ.copy(), **{"PS1": self._ps1, "PS2": "", "PS0": ""}), # type: ignore
163164
)
164165
time.sleep(0.3)
165166
cmds = []

0 commit comments

Comments
 (0)