ai-dev-kit
ai-dev-kit copied to clipboard
install.sh: syntax error on macOS - } used instead of fi
Bug
Following the install guide on macOS with default bash (3.2.57):
bash <(curl -sL https://raw.githubusercontent.com/databricks-solutions/ai-dev-kit/main/install.sh)
Throws the following syntax error:
/dev/fd/11: line 862: syntax error near unexpected token `}'
Cause
install.sh line 862 closes an if block with } instead of fi:
if [ "$SCOPE" = "project" ]; then
mkdir -p ".ai-dev-kit"
echo "$ver" > ".ai-dev-kit/version"
} # <-- should be "fi"
This appears to cause a syntax error on macOS with bash 3.2.57.
In case anyone else is running into this issue, you can use this workaround:
curl -sL https://raw.githubusercontent.com/databricks-solutions/ai-dev-kit/main/install.sh -o /tmp/ai-dev-kit-install.sh
sed -i '' '862s/}/fi/' /tmp/ai-dev-kit-install.sh
bash /tmp/ai-dev-kit-install.sh
Hi @XtremeCurling , thanks for reporting this. This was resolved in the PR https://github.com/databricks-solutions/ai-dev-kit/pull/186