Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commitc7fad20
committed
Fix Windows env var upcasing regression
This uses a simple hand-rolled context manager to patch theNoDefaultCurrentDirectoryInExePath variable, instead ofunittest.mock.patch.dict. The latter set unrelated environmentvariables to the original (same) values via os.environ, and as aresult, their names were all converted to upper-case on Windows.Because only environment variables that are actually set throughos.environ have their names upcased, the only variable whose nameshould be upcased now is NoDefaultCurrentDirectoryInExePath, whichshould be fine (it has a single established use/meaning in Windows,where it's treated case-insensitively as environment variables inWindows *usually* are).1 parent7296e5c commitc7fad20
2 files changed
+19
-6
lines changedLines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
18 | 17 |
| |
19 | 18 |
| |
20 | 19 |
| |
| |||
24 | 23 |
| |
25 | 24 |
| |
26 | 25 |
| |
27 |
| - | |
| 26 | + | |
28 | 27 |
| |
29 | 28 |
| |
30 | 29 |
| |
| |||
965 | 964 |
| |
966 | 965 |
| |
967 | 966 |
| |
968 |
| - | |
| 967 | + | |
969 | 968 |
| |
970 | 969 |
| |
971 |
| - | |
| 970 | + | |
972 | 971 |
| |
973 | 972 |
| |
974 | 973 |
| |
| |||
984 | 983 |
| |
985 | 984 |
| |
986 | 985 |
| |
987 |
| - | |
| 986 | + | |
988 | 987 |
| |
989 | 988 |
| |
990 | 989 |
| |
|
Lines changed: 15 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
158 | 158 |
| |
159 | 159 |
| |
160 | 160 |
| |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
161 | 175 |
| |
162 | 176 |
| |
163 | 177 |
| |
| |||
935 | 949 |
| |
936 | 950 |
| |
937 | 951 |
| |
938 |
| - | |
| 952 | + | |
939 | 953 |
| |
940 | 954 |
| |
941 | 955 |
| |
|
0 commit comments
Comments
(0)