Skip to content

Commit 266b01f

Browse files
author
Hugo Rialan
committed
fix
1 parent 7cc0ac9 commit 266b01f

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

hooks/dataform_format.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ if ! command -v dataform >/dev/null 2>&1; then
66
exit 1
77
fi
88

9-
dataform format
9+
# Run Dataform formatting
10+
output=$(dataform format 2>&1)
11+
exit_code=$?
12+
13+
if [ $exit_code -ne 0 ]; then
14+
echo "Dataform formatting failed:"
15+
echo "$output"
16+
echo "Please review the formatting errors before committing."
17+
exit 1
18+
fi
1019

1120
echo "Dataform formatting complete. Please review the changes before committing."
1221
exit 0

0 commit comments

Comments
 (0)