Introduce LEGENDARY_CONFIG_PATH

This commit is contained in:
Etaash Mathamsetty 2023-08-11 00:52:47 -04:00 committed by GitHub
parent bd2e7ca0cd
commit 3362413e05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,9 @@ class LGDLFS:
def __init__(self, config_file=None):
self.log = logging.getLogger('LGDLFS')
if config_path := os.environ.get('XDG_CONFIG_HOME'):
if config_path := os.environ.get('LEGENDARY_CONFIG_PATH'):
self.path = os.path.join(config_path, 'legendary')
elif config_path := os.environ.get('XDG_CONFIG_HOME'):
self.path = os.path.join(config_path, 'legendary')
else:
self.path = os.path.expanduser('~/.config/legendary')