Don't create a dictionary in CI; error if it's not found

This commit is contained in:
Carol (Nichols || Goulding) 2018-12-16 22:06:22 -05:00
parent 41aeb67f8d
commit e7d52b93ce
No known key found for this signature in database
GPG Key ID: D04B39A6CA243902
1 changed files with 7 additions and 0 deletions

7
ci/spellcheck.sh Normal file → Executable file
View File

@ -53,6 +53,13 @@ if [[ "$1" == "list" ]]; then
mode="list"
fi
# Error if running in list (CI) mode and there isn't a dictionary file;
# creating one in CI won't do any good :(
if [[ "$mode" == "list" && ! -f "$dict_filename" ]]; then
echo "No dictionary file found! A dictionary file is required in CI!"
exit 1
fi
if [[ ! -f "$dict_filename" ]]; then
# Pre-check mode: generates dictionary of words aspell consider typos.
# After user validates that this file contains only valid words, we can