diff --git a/cutekit/builder.py b/cutekit/builder.py index f505ec0..5fe9f6c 100644 --- a/cutekit/builder.py +++ b/cutekit/builder.py @@ -111,7 +111,7 @@ def build(componentSpec: str, targetSpec: str, props: Props = {}) -> ComponentIn raise RuntimeError( f"Component {componentSpec} is disabled: {instance.disableReason}") - shell.exec(f"ninja", "-v", "-f", ninjaPath, instance.outfile()) + shell.exec(f"ninja", "-f", ninjaPath, instance.outfile()) return instance diff --git a/cutekit/shell.py b/cutekit/shell.py index 133a596..3db2abe 100644 --- a/cutekit/shell.py +++ b/cutekit/shell.py @@ -234,7 +234,12 @@ def latest(cmd: str) -> str: logger.info(f"Finding latest version of {cmd}") - regex = re.compile(r"^" + re.escape(cmd) + r"(-.[0-9]+)?(\.exe)?$") + regex: re.Pattern[str] + + if platform.system() == "Windows": + regex = re.compile(r"^" + re.escape(cmd) + r"(-.[0-9]+)?(\.exe)?$") + else: + regex = re.compile(r"^" + re.escape(cmd) + r"(-[0-9]+)?$") versions: list[str] = [] for path in os.environ["PATH"].split(os.pathsep):