Skip to content

Commit ba22a66

Browse files
committed
Fix check for empty variables as it broke tests and we later check if paths exist as directory.
1 parent 950e88c commit ba22a66

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tmuxp/cli.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ def get_config_dir():
3535
"""
3636
Return tmuxp configuration directory.
3737
38-
``TMUXP_CONFIGDIR`` environmental variable has precedence if set and not
39-
empty. We also honor XDG default directory, evaluating from XDG_CONFIG_HOME
40-
environmental variable if set and not empty or its default. Then the old
41-
default ~/.tmuxp is returned for compatibility.
38+
``TMUXP_CONFIGDIR`` environmental variable has precedence if set. We also
39+
evaluate XDG default directory from XDG_CONFIG_HOME environmental variable
40+
if set or its default. Then the old default ~/.tmuxp is returned for
41+
compatibility.
4242
4343
Returns
4444
-------
@@ -47,9 +47,9 @@ def get_config_dir():
4747
"""
4848

4949
paths = []
50-
if 'TMUXP_CONFIGDIR' in os.environ and os.environ['TMUX_CONFIGDIR']:
50+
if 'TMUXP_CONFIGDIR' in os.environ:
5151
paths.append(os.environ['TMUXP_CONFIGDIR'])
52-
if 'XDG_CONFIG_HOME' in os.environ and os.environ['XDG_CONFIG_HOME']:
52+
if 'XDG_CONFIG_HOME' in os.environ:
5353
paths.append(os.environ['XDG_CONFIG_HOME'])
5454
else:
5555
paths.append('~/.config/tmuxp/')

0 commit comments

Comments
 (0)