mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[lfs] Allow setting config dir via LEGENDARY_CONFIG_PATH
env var (#590)
This commit is contained in:
parent
488d14c6e0
commit
c56a81ab64
|
@ -26,7 +26,9 @@ class LGDLFS:
|
||||||
def __init__(self, config_file=None):
|
def __init__(self, config_file=None):
|
||||||
self.log = logging.getLogger('LGDLFS')
|
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 = config_path
|
||||||
|
elif config_path := os.environ.get('XDG_CONFIG_HOME'):
|
||||||
self.path = os.path.join(config_path, 'legendary')
|
self.path = os.path.join(config_path, 'legendary')
|
||||||
else:
|
else:
|
||||||
self.path = os.path.expanduser('~/.config/legendary')
|
self.path = os.path.expanduser('~/.config/legendary')
|
||||||
|
|
Loading…
Reference in a new issue