diff --git a/gitsome/config.py b/gitsome/config.py index 95db91d..91ed138 100644 --- a/gitsome/config.py +++ b/gitsome/config.py @@ -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 diff --git a/tests/test_config.py b/tests/test_config.py index 823c317..8e39025 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -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