diff --git a/dvc/repo/metrics/show.py b/dvc/repo/metrics/show.py index 0bdc3a680..6bb78194e 100644 --- a/dvc/repo/metrics/show.py +++ b/dvc/repo/metrics/show.py @@ -2,6 +2,8 @@ import logging import os from typing import List +from scmrepo.exceptions import SCMError + from dvc.fs.repo import RepoFileSystem from dvc.output import Output from dvc.repo import locked @@ -121,8 +123,8 @@ def show( # Hide workspace metrics if they are the same as in the active branch try: active_branch = repo.scm.active_branch() - except (TypeError, NoSCMError): - # TypeError - detached head + except (SCMError, NoSCMError): + # SCMError - detached head # NoSCMError - no repo case pass else: diff --git a/setup.cfg b/setup.cfg index 54e5934b9..4762f4b85 100644 --- a/setup.cfg +++ b/setup.cfg @@ -75,7 +75,7 @@ install_requires = aiohttp-retry>=2.4.5 diskcache>=5.2.1 jaraco.windows>=5.7.0; python_version < '3.8' and sys_platform == 'win32' - scmrepo==0.0.10 + scmrepo==0.0.13 [options.extras_require] all =