check for vcs only if commit enabled

This commit is contained in:
Valentin 2020-07-18 00:12:58 +00:00
parent 8d7b09e13d
commit 2f1d6aa2d2

View file

@ -215,6 +215,7 @@ def _assert_not_dirty(_vcs: vcs.VCS, filepaths: typ.Set[str], allow_dirty: bool)
def _bump(cfg: config.Config, new_version: str, allow_dirty: bool = False) -> None: def _bump(cfg: config.Config, new_version: str, allow_dirty: bool = False) -> None:
_vcs: typ.Optional[vcs.VCS] _vcs: typ.Optional[vcs.VCS]
if cfg.commit:
try: try:
_vcs = vcs.get_vcs() _vcs = vcs.get_vcs()
except OSError: except OSError: