Skip to content

Commit b8cf773

Browse files
Revert the path detection
Pylibjuju really needs to better handle path detection and tbh it shouldn't be reading your home directory and everything should be passed in.
1 parent 8627287 commit b8cf773

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

juju/client/jujudata.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ class FileJujuData(JujuData):
121121
'''Provide access to the Juju client configuration files.
122122
Any configuration file is read once and then cached.'''
123123
def __init__(self):
124-
default_data_dir = pathlib.Path(pathlib.Path.home(), ".local", "share", "juju")
125-
self.path = os.environ.get('JUJU_DATA', default_data_dir)
124+
self.path = os.environ.get('JUJU_DATA') or '~/.local/share/juju'
126125
self.path = os.path.abspath(os.path.expanduser(self.path))
127126
# _loaded keeps track of the loaded YAML from
128127
# the Juju data files so we don't need to load the same

0 commit comments

Comments
 (0)