diff --git a/.githooks/pre-push b/.githooks/pre-push index eb1acbb693c1..94cc937c9b1d 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Pre-push hook verifying that inappropriate code will not be pushed. @@ -8,7 +8,13 @@ NC='\033[0m' # No Color # Check that prettier formatting rules are not violated. if ! zk fmt --check; then - echo -e "${RED}Commit error!${NC}" + echo -e "${RED}Push error!${NC}" echo "Please format the code via 'zk fmt', cannot push unformatted code" exit 1 fi + +if ! zk db check-sqlx-data; then + echo -e "${RED}Push error!${NC}" + echo "Please update sqlx-data.json via 'zk db setup', cannot push invalid sqlx-data.json file" + exit 1 +fi