yocto-autobuilder-helper/scripts/pre-commit-hook.sh
Ross Burton b3eb077391 pre-commit-hook: add a pre-commit hook to verify the JSON
Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-05-11 11:36:06 +01:00

7 lines
132 B
Bash
Executable File

#! /bin/sh
if ! python3 -m json.tool config.json >/dev/null; then
echo "config.json isn't valid, aborting commit." >&2
exit 1
fi