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 eadfc02 commit 494900dCopy full SHA for 494900d
tldr.py
@@ -96,9 +96,10 @@ def get_cache_dir() -> Path:
96
97
98
def get_system_cache_dir() -> Path:
99
- for entry in os.environ.get('XDG_DATA_DIRS').split(':'):
100
- if (Path(entry) / 'tldr').is_dir():
101
- return Path(entry) / 'tldr'
+ if os.environ.get('XDG_DATA_DIRS', False):
+ for entry in os.environ.get('XDG_DATA_DIRS').split(':'):
+ if (Path(entry) / 'tldr').is_dir():
102
+ return Path(entry) / 'tldr'
103
return Path('/usr/share/tldr')
104
105
0 commit comments