diff --git a/scabha/configuratt/deps.py b/scabha/configuratt/deps.py index 2eee8b9b..1986c789 100644 --- a/scabha/configuratt/deps.py +++ b/scabha/configuratt/deps.py @@ -4,6 +4,7 @@ import datetime import fnmatch import subprocess +from shutil import which from dataclasses import dataclass from omegaconf.omegaconf import OmegaConf, DictConfig, ListConfig @@ -32,6 +33,7 @@ class ConfigDependencies(object): def __init__(self): self.deps = OmegaConf.create() self.fails = OmegaConf.create() + self._git = which("git") # self.provides = OmegaConf.create() # self.requires = OmegaConf.create() @@ -107,6 +109,8 @@ def _get_git_info(self, dirname: str): # check cache first if dirname in self._git_cache: return self._git_cache[dirname] + if not self._git: + return None try: branches = subprocess.check_output("git -c color.ui=never branch -a -v -v".split(), cwd=dirname,