Преглед на файлове

Merge pull request #10535 from thalesmg/spellcheck-assert-file-exists-v50

ci: check if given schema.json exists before running spellcheck
Thales Macedo Garitezi преди 2 години
родител
ревизия
7055bd8564
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      scripts/spellcheck/spellcheck.sh

+ 5 - 0
scripts/spellcheck/spellcheck.sh

@@ -12,6 +12,11 @@ else
     SCHEMA="$(realpath "$1")"
     SCHEMA="$(realpath "$1")"
 fi
 fi
 
 
+if ! [ -f "$SCHEMA" ]; then
+  echo "Schema file $SCHEMA does not exist; did you forget to run 'make emqx{,-enterprise}' ?"
+  exit 1
+fi
+
 set +e
 set +e
 docker run --rm -i --name spellcheck \
 docker run --rm -i --name spellcheck \
     -v "${PROJ_ROOT}"/scripts/spellcheck/dicts:/dicts \
     -v "${PROJ_ROOT}"/scripts/spellcheck/dicts:/dicts \