Skip to content

Commit b17b26d

Browse files
authored
Fix: require uv in prereq check instead of silent pip fallback (#363)
* fix: require uv as hard prerequisite instead of silently falling back to pip (#351) * Lint fix
1 parent 6bf6776 commit b17b26d

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

install.sh

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -994,14 +994,12 @@ check_deps() {
994994
if [ "$INSTALL_MCP" = true ]; then
995995
if command -v uv >/dev/null 2>&1; then
996996
PKG="uv"
997-
elif command -v pip3 >/dev/null 2>&1; then
998-
PKG="pip3"
999-
elif command -v pip >/dev/null 2>&1; then
1000-
PKG="pip"
997+
ok "$PKG ($(uv --version 2>/dev/null || echo 'unknown version'))"
1001998
else
1002-
die "Python package manager required. Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh"
999+
die "uv is required but not found on your PATH.
1000+
Install it with: ${B}curl -LsSf https://astral.sh/uv/install.sh | sh${N}
1001+
Then re-run this installer."
10031002
fi
1004-
ok "$PKG"
10051003
fi
10061004
}
10071005

@@ -1069,13 +1067,8 @@ setup_mcp() {
10691067
fi
10701068

10711069
msg "Installing Python dependencies..."
1072-
if [ "$PKG" = "uv" ]; then
1073-
$arch_prefix uv venv --python 3.11 --allow-existing "$VENV_DIR" -q 2>/dev/null || $arch_prefix uv venv --allow-existing "$VENV_DIR" -q
1074-
$arch_prefix uv pip install --python "$VENV_PYTHON" -e "$REPO_DIR/databricks-tools-core" -e "$REPO_DIR/databricks-mcp-server" -q
1075-
else
1076-
[ ! -d "$VENV_DIR" ] && $arch_prefix python3 -m venv "$VENV_DIR"
1077-
$arch_prefix "$VENV_PYTHON" -m pip install -q -e "$REPO_DIR/databricks-tools-core" -e "$REPO_DIR/databricks-mcp-server"
1078-
fi
1070+
$arch_prefix uv venv --python 3.11 --allow-existing "$VENV_DIR" -q 2>/dev/null || $arch_prefix uv venv --allow-existing "$VENV_DIR" -q
1071+
$arch_prefix uv pip install --python "$VENV_PYTHON" -e "$REPO_DIR/databricks-tools-core" -e "$REPO_DIR/databricks-mcp-server" -q
10791072

10801073
"$VENV_PYTHON" -c "import databricks_mcp_server" 2>/dev/null || die "MCP server install failed"
10811074
ok "MCP server ready"

0 commit comments

Comments
 (0)