Skip to content

Commit ccab574

Browse files
author
Hugo Rialan
committed
Add Dataform installation
1 parent ca2bb40 commit ccab574

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hooks/dataform_format.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/sh
22

3-
# Check if dataform command is available
3+
# Check if dataform command is available, if not install it
44
if ! command -v dataform >/dev/null 2>&1; then
5-
echo "Error: dataform command not found. Make sure it is installed. Refer to the official Dataform documentation for installation instructions: https://cloud.google.com/dataform/docs/use-dataform-cli#install_cli"
6-
exit 1
5+
echo "Dataform is not installed. Installing it now..."
6+
npm i -g @dataform/cli@latest
77
fi
88

99
# Run Dataform formatting for SQLX files

0 commit comments

Comments
 (0)