Skip to content

Avoid modifying process with --env-file in uv run#19567

Merged
charliermarsh merged 2 commits into
mainfrom
charlie/run-env-file-child-only
May 26, 2026
Merged

Avoid modifying process with --env-file in uv run#19567
charliermarsh merged 2 commits into
mainfrom
charlie/run-env-file-child-only

Conversation

@charliermarsh
Copy link
Copy Markdown
Member

Summary

We changed this for uv tool run in #19343, but missed this other site.

@charliermarsh charliermarsh added the bug Something isn't working label May 26, 2026
@charliermarsh charliermarsh requested a review from woodruffw May 26, 2026 15:14
@charliermarsh charliermarsh marked this pull request as ready for review May 26, 2026 15:14

// Read from the `.env` file, if necessary.
for env_file_path in env_file.iter().rev().map(PathBuf::as_path) {
match dotenvy::from_path(env_file_path) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could also ban this API via clippy.toml? Along with the other in-place env mutation APIs 🙂

Copy link
Copy Markdown
Member

@woodruffw woodruffw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one suggestion for banning these APIs permanently.

@charliermarsh charliermarsh enabled auto-merge (squash) May 26, 2026 15:46
@charliermarsh charliermarsh merged commit f807b28 into main May 26, 2026
62 checks passed
@charliermarsh charliermarsh deleted the charlie/run-env-file-child-only branch May 26, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants