Skip to content

Commit 636af39

Browse files
author
Enrique Gonzalez
committed
forward current env to nox sessions
1 parent 83bca0e commit 636af39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

noxfile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def test_tools(session: nox.Session, datatest: bool) -> None:
167167
with session.chdir("tools"):
168168
session.run(
169169
*f"pytest -sv --benchmark-disable -n auto {'--datatest-only' if datatest else '--datatest-skip'}".split(),
170-
*session.posargs
170+
*session.posargs,
171+
env={**os.environ}
171172
)
172173

173174
# -- utils --
@@ -181,7 +182,7 @@ def _install_session_venv(
181182
#TODO(egparedes): remove this workaround once `backend` parameter is added to sessions
182183
if (env_extras := os.environ.get("ICON4PY_NOX_UV_CUSTOM_SESSION_EXTRAS", "")):
183184
extras = [*extras, *re.split(r'\W+', env_extras)]
184-
env = dict(os.environ.items()) | {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
185+
env = os.environ | {"UV_PROJECT_ENVIRONMENT": session.virtualenv.location}
185186
session.run_install(
186187
"uv",
187188
"sync",

0 commit comments

Comments
 (0)