disallowed unsupported subcommands

This commit is contained in:
burnettk 2022-09-08 12:52:28 -04:00
parent 828a57ac4e
commit 14bba6f3c0
1 changed files with 5 additions and 1 deletions

View File

@ -11,9 +11,13 @@ export FLASK_SESSION_SECRET_KEY="this_is_recreate_db_secret_key"
tasks=""
if [[ "${1:-}" == "clean" ]]; then
if [[ "${2:-}" == "rmall" ]]; then
subcommand="${2:-}"
if [[ "$subcommand" == "rmall" ]]; then
tasks="$tasks init migrate"
rm -rf migrations/
elif [[ -n "$subcommand" ]]; then
>&2 echo "ERROR: you passed a subcommand that was not rmall, and that is not supported: $subcommand"
exit 1
fi
rm -f ./src/instance/*.sqlite3