We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8993718 commit 7b17c15Copy full SHA for 7b17c15
distutils/dist.py
@@ -354,7 +354,12 @@ def _gen_paths(self):
354
prefix = '.' * (os.name == 'posix')
355
filename = prefix + 'pydistutils.cfg'
356
if self.want_user_cfg:
357
- yield pathlib.Path('~').expanduser() / filename
+ try:
358
+ user_home = pathlib.Path('~').expanduser()
359
+ except RuntimeError:
360
+ self.announce("Failed to locate user home directory. Skipping user config.", logging.WARNING)
361
+ else:
362
+ yield user_home / filename
363
364
# All platforms support local setup.cfg
365
yield pathlib.Path('setup.cfg')
0 commit comments