mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
analytics: don't verify config from repo
Otherwise this will raise an exception from analytics worker: ``` dvc config cache.type sometypo ``` But running that same command with `--system` or `--global` flag outside of repo won't raise that. Also need to better handle ConfigObjError, but that is a separate issue.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from dvc.analytics import Analytics
|
||||
from dvc.config import Config
|
||||
from dvc.repo import NotDvcRepoError
|
||||
|
||||
|
||||
def test_broken_config(mocker, dvc_repo):
|
||||
Config(dvc_repo.dvc_dir, validate=False).set("cache", "type", "unknown")
|
||||
|
||||
assert Analytics._get_current_config()
|
||||
|
||||
with mocker.patch(
|
||||
"dvc.repo.Repo.find_dvc_dir", side_effect=NotDvcRepoError(".")
|
||||
):
|
||||
assert Analytics._get_current_config()
|
||||
Reference in New Issue
Block a user