Fix setting custom config root
This commit is contained in:
parent
b0fce17cf2
commit
72e69a59af
1 changed files with 4 additions and 4 deletions
|
@ -54,7 +54,7 @@ def set_profile(profile: str):
|
||||||
|
|
||||||
|
|
||||||
def set_config_root(config_root: str):
|
def set_config_root(config_root: str):
|
||||||
_paths.config_root = config_root
|
_paths.custom_config_root = config_root
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
|
@ -66,7 +66,7 @@ class ConfigPaths:
|
||||||
self.paths = {}
|
self.paths = {}
|
||||||
self.profile = ''
|
self.profile = ''
|
||||||
self.profile_separation = False
|
self.profile_separation = False
|
||||||
self.config_root = None
|
self.custom_config_root = None
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
try:
|
try:
|
||||||
|
@ -123,8 +123,8 @@ class ConfigPaths:
|
||||||
yield (key, self[key])
|
yield (key, self[key])
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
if self.config_root is not None:
|
if self.custom_config_root:
|
||||||
self.cache_root = self.data_root = self.config_root
|
self.cache_root = self.data_root = self.config_root = self.custom_config_root
|
||||||
|
|
||||||
self.add('CONFIG_ROOT', None, self.config_root)
|
self.add('CONFIG_ROOT', None, self.config_root)
|
||||||
self.add('CACHE_ROOT', None, self.cache_root)
|
self.add('CACHE_ROOT', None, self.cache_root)
|
||||||
|
|
Loading…
Add table
Reference in a new issue