Closed WilliamVenner closed 2 years ago
This is on Windows 11 BTW. Not sure about the others
@WilliamVenner Thank you for reporting! I'll look into it.
Notably, whoami::devicename()
returns the correct casing. Maybe this is the intended behaviour of hostnames on Windows?
After looking at it, I believe the current behavior is correct. The difference between hostname()
and devicename()
is that devicename()
takes into account "fancy" styling which generally ignored by hostnames (such as casing on Windows, and on Linux can also include spaces and punctuation).
It might even make more sense to normalize the hostname returned by the OS to lowercase across all platforms (since Windows is the only one that returns it in all capitals; other platforms return the case-insensitive string in all lowercase).
Ok yeah, that makes sense. Thank you!
Describe the bug The hostname returned by
whoami::hostname
is in all capitals on Windows.To Reproduce
Expected behavior The hostname should be returned in the correct casing.
Screenshots