Skip to content

Clarify CommandFunction environment replacement - #1825

Merged
jrapin merged 2 commits into
facebookincubator:mainfrom
abhinavs1920:docs-command-env-1781
Nov 4, 2026
Merged

jrapin merged 2 commits into
facebookincubator:mainfrom
abhinavs1920:docs-command-env-1781

Conversation

@abhinavs1920

Copy link
Copy Markdown
Contributor

Fixes #1781.

The env argument replaces the inherited subprocess environment. The example now makes that explicit and shows how to merge with os.environ to keep PATH and other variables.

Adds a regression test for inherited, replaced and merged environments. No runtime behavior change.

Tested locally: core and local tests, 60 passed, 1 skipped.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
@jrapin

jrapin commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

thanks for the PR!

@jrapin
jrapin merged commit 8ab05f4 into facebookincubator:main Nov 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting env in CommandFunction overrides PATH env var

2 participants