ai-dev-kit icon indicating copy to clipboard operation
ai-dev-kit copied to clipboard

install.sh: syntax error on macOS - } used instead of fi

Open XtremeCurling opened this issue 9 months ago • 2 comments

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.

XtremeCurling avatar Feb 25 '26 18:02 XtremeCurling

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

XtremeCurling avatar Feb 25 '26 18:02 XtremeCurling

Hi @XtremeCurling , thanks for reporting this. This was resolved in the PR https://github.com/databricks-solutions/ai-dev-kit/pull/186

malcolndandaro avatar Feb 26 '26 22:02 malcolndandaro