Skip to content

Prefer getpass.getuser() over os.getlogin()#109

Merged
aiuto merged 1 commit intobazelbuild:mainfrom
mering:fix-username-gh-codespaces
Sep 13, 2023
Merged

Prefer getpass.getuser() over os.getlogin()#109
aiuto merged 1 commit intobazelbuild:mainfrom
mering:fix-username-gh-codespaces

Conversation

@mering
Copy link
Copy Markdown
Contributor

@mering mering commented Aug 30, 2023

Prefer getpass.getuser() over os.getlogin() as noted in the official docs.

This fixes the following error when running within a Debian container in GitHub codespaces:

>>> import os
>>> os.getlogin()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 6] No such device or address
  • Tests pass
  • Tests and examples for any new features.
  • Appropriate changes to README are included in PR

@mering mering requested a review from aiuto as a code owner August 30, 2023 14:44
@aiuto
Copy link
Copy Markdown
Collaborator

aiuto commented Sep 13, 2023

Thanks for catching this.

@aiuto aiuto merged commit 608c67e into bazelbuild:main Sep 13, 2023
@mering mering deleted the fix-username-gh-codespaces branch September 13, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants