Skip to content

Commit

Permalink
[lfs] Allow setting config dir via LEGENDARY_CONFIG_PATH env var (#590
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Etaash-mathamsetty committed Oct 14, 2023
1 parent 488d14c commit c56a81a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion legendary/lfs/lgndry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = config_path
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')
Expand Down

0 comments on commit c56a81a

Please sign in to comment.