From 4e5015a9440dbf0acebcc96c71a6a618cafc0173 Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Thu, 8 Feb 2024 10:44:44 +0200 Subject: [PATCH] fixes #223 --- scabha/configuratt/deps.py | 4 ++++ stimela/commands/build.py | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) 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, diff --git a/stimela/commands/build.py b/stimela/commands/build.py index 2d286285..7f5d7288 100644 --- a/stimela/commands/build.py +++ b/stimela/commands/build.py @@ -28,11 +28,8 @@ help="""explicitly skips steps wth the given tags. Use commas, or give multiple times for multiple tags.""") @click.option("-e", "--enable-step", "enable_steps", metavar="STEP(s)", multiple=True, - help="""Force-enable steps even if the recipe marks them as skipped. Use commas, or give multiple times + help="""Builds a step even if the recipe marks it as skipped. Use commas, or give multiple times for multiple steps.""") -@click.option("-a", "--assign", metavar="PARAM VALUE", nargs=2, multiple=True, - help="""assigns values to parameters: equivalent to PARAM=VALUE, but plays nicer with the shell's - tab completion.""") @click.option("-l", "--last-recipe", is_flag=True, help="""if multiple recipes are defined, selects the last one for building.""") @click.argument("what", metavar="filename.yml|cab name")