Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gitsome/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def get_github_config_path(self, config_file_name):
:rtype: str
:return: The github config file path.
"""
home = os.path.abspath(os.environ.get('HOME', ''))
home = os.path.abspath(os.environ.get('$XDG_CONFIG_HOME', ''))
config_file_path = os.path.join(home, config_file_name)
return config_file_path

Expand Down
3 changes: 2 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def verify_login_pass_url_enterprise(self, username=None, password=None,
assert verify

def test_config(self):
expected = os.path.join(os.path.abspath(os.environ.get('HOME', '')),
expected = os.path.join(os.path.abspath(os.environ.get(
'$XDG_CONFIG_HOME', '')),
self.github.config.CONFIG)
assert self.github.config \
.get_github_config_path(self.github.config.CONFIG) == expected
Expand Down