Repository navigation
🐛 fix(batch): preserve inherited shell punctuation - #3731
Merged
Merged
Conversation
gaborbernat
force-pushed
the
fix/0yrl-batch-path-delayed
branch
from
November 20, 2026 15:14
de5ec31 to
5942dce
Compare
With delayed expansion enabled, cmd rescans inherited values after a %VAR% substitution and replaces embedded !name! text. Read the source through !VAR! in that mode so activation and deactivation preserve PATH, prompt, and tool paths.
gaborbernat
force-pushed
the
fix/0yrl-batch-path-delayed
branch
from
November 20, 2026 15:27
5942dce to
db21c47
Compare
gaborbernat
marked this pull request as ready for review
November 20, 2026 16:17
gaborbernat
marked this pull request as draft
November 20, 2026 20:49
gaborbernat
marked this pull request as ready for review
November 20, 2026 22:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows batch activation could change an inherited path or prompt before deactivation restored it. Under delayed expansion, literal
!characters could disappear. A quotedPATHentry such as"C:\Build ^ tools\bin"could lose the caret even with delayed expansion off. Fixes #3617.The activation and deactivation scripts copy inherited values after the shell parses the assignment. The environment's scripts directory still leads
PATHwhile active. On deactivation, the scripts restore the single-line values ofPATH,PROMPT,PYTHONHOME,TCL_LIBRARY,TK_LIBRARY, andPKG_CONFIG_PATH, even if the caller changed delayed expansion between the two calls.Reported by oss-scanner: ANT-2026-0YRL0MX4.