Case-sensitive username on windows test causes failure
jasongrout opened this issue · 2 comments
jasongrout commented
Building the 4.8.0 conda-forge package, we are seeing a test failure on windows:
def check_user_only_permissions(fname):
# Windows has it's own permissions ACL patterns
username = os.environ["USERNAME"]
permissions = fetch_win32_permissions(fname)
print(permissions) # for easier debugging
> assert username in permissions
E AssertionError: assert 'VssAdministrator' in {'administrators': {'f'}, 'vssadministrator': {'d', 'r', 'w'}}
It seems that the fetch_win32_permissions is giving the lowercase "vssadministrator", while the USERNAME environment variable is cased as "VssAdministrator".
Are usernames in windows case-sensitive?
jasongrout commented
Well, it looks like we explicitly lowercase the username in the code right above it.
And it looks like we accidentally removed the lowercasing of the username in this function: 2a08a19
Patch coming up to return to lowercasing the username. It does appear from some random googling/duckducking that windows usernames are case insensitive.
jasongrout commented
Thanks. Releasing 4.8.1 with this now...