You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows is case insensitive for the environment control block, which we
did not honour. This causes issues when Swift is used with programs
which are incorrectly cased (e.g. emacs). Introduce an explicit wrapper
type for Windows to make the lookup case insensitive, canonicalising the
name to lowercase. This allows us to treat Path and PATH identically
(along with any other environment variable and case matching) which
respects the Windows behaviour. Additionally, migrate away from the
POSIX variants which do not handle the case properly to the Windows
version which does.
The introduced type `ProcessEnvironmentBlock` is just a typealias,
allowing access to the dictionary itself which is important to preserve
the behaviour for the clients. The `CaseInsensitiveString` is a case
insensitive, case preserving string representation that allows us to
recreate the environment on Windows as the environment is case
insensitive, so it should not be possible to have conflicts when reading
the Process Environment Block from the Process Execution Block.
This is a partial resolution to environment variable handling as the
tools need subsequent changes to adopt the new API.
Fixes: swiftlang#446
0 commit comments