Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix propagateEnv = false to not propagate env #238

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Nov 18, 2023

Originated from com-lihaoyi/mill#2881

Pull request: #238

val environment = builder.environment()

if (!propagateEnv) {
environment.clear()
Copy link
Member Author

Choose a reason for hiding this comment

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

java.lang.ProcessBuilder propagates the environment by default. If you don't want to propagate it you need to clear() the map.

Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Nice catch! Looks good to me. One nit below.

os/test/src-jvm/SubprocessTests.scala Show resolved Hide resolved
@lolgab lolgab requested a review from lefou November 18, 2023 14:11
@lolgab lolgab merged commit 7000353 into com-lihaoyi:main Nov 18, 2023
9 checks passed
@lolgab lolgab deleted the fix-propagateEnv branch November 18, 2023 14:34
@lefou lefou added this to the after 0.9.2 milestone Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants