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 Windows environment variable upcasing bug #1650

Merged
merged 4 commits into from
Sep 7, 2023

Commits on Sep 7, 2023

  1. Configuration menu
    Copy the full SHA
    d88372a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7296e5c View commit details
    Browse the repository at this point in the history
  3. Fix Windows env var upcasing regression

    This uses a simple hand-rolled context manager to patch the
    NoDefaultCurrentDirectoryInExePath variable, instead of
    unittest.mock.patch.dict. The latter set unrelated environment
    variables to the original (same) values via os.environ, and as a
    result, their names were all converted to upper-case on Windows.
    
    Because only environment variables that are actually set through
    os.environ have their names upcased, the only variable whose name
    should be upcased now is NoDefaultCurrentDirectoryInExePath, which
    should be fine (it has a single established use/meaning in Windows,
    where it's treated case-insensitively as environment variables in
    Windows *usually* are).
    EliahKagan committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    c7fad20 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    eebdb25 View commit details
    Browse the repository at this point in the history