Fix conditional yamllint execution
authorKarl O. Pinc <kop@karlpinc.com>
Fri, 21 Jun 2024 23:10:58 +0000 (18:10 -0500)
committerKarl O. Pinc <kop@karlpinc.com>
Fri, 21 Jun 2024 23:10:58 +0000 (18:10 -0500)
Makefile_pgwui.mk

index 97c646e4e876880cf341324dea42c05c87cf0cea..90c666077a59a76d720270e67c59c1c0306bd37d 100644 (file)
@@ -188,7 +188,9 @@ DEVEL_DEPS := setup.py pyproject.toml MANIFEST.in
 .PHONY: run-linters
 run-linters: devel/pytest
        devel/pytest/bin/flake8 .
-       [ -e .yamllint.yaml ] && devel/pytest/bin/yamllint --strict .
+       if [ -e .yamllint.yaml ] ; then \
+         devel/pytest/bin/yamllint --strict . ; \
+       fi
 
 # Re-create development environment when build environment changes
 devel: $(DEVEL_DEPS)
@@ -226,7 +228,9 @@ devel/pytest: $(DEVEL_DEPS)
             devel/pytest/bin/pip install --upgrade wheel ; \
             devel/pytest/bin/pip install dist/${PGWUI_COMPONENT}-*.tar.gz ; \
             devel/pytest/bin/pip install flake8 ; \
-            [ -e .yamllint.yaml ] && devel/pytest/bin/pip install yamllint ; \
+            if [ -e .yamllint.yaml ] ; then \
+              devel/pytest/bin/pip install yamllint ; \
+            fi ; \
             devel/pytest/bin/pip install pytest-cov ; \
             devel/pytest/bin/pip install -e '.[test]' ; \
           ) \