mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
fix(config): respect global config env variable
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
06b9196371
commit
d238350a2d
+1
-1
@@ -15,7 +15,7 @@ def system_config_dir():
|
||||
|
||||
|
||||
def global_config_dir():
|
||||
return os.getenv(env.DVC_SYSTEM_CONFIG_DIR) or platformdirs.user_config_dir(
|
||||
return os.getenv(env.DVC_GLOBAL_CONFIG_DIR) or platformdirs.user_config_dir(
|
||||
APPNAME, APPAUTHOR
|
||||
)
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
from dvc.dirs import global_config_dir
|
||||
from dvc.env import DVC_GLOBAL_CONFIG_DIR
|
||||
|
||||
|
||||
def test_global_config_dir_respects_env_var(monkeypatch):
|
||||
path = "/some/random/path"
|
||||
monkeypatch.setenv(DVC_GLOBAL_CONFIG_DIR, path)
|
||||
assert global_config_dir() == path
|
||||
Reference in New Issue
Block a user