Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions public/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,26 @@ check_git() {
return 1
}

check_build_tools() {
local missing=()

if ! command -v make &> /dev/null; then
missing+=("make")
fi

if ! command -v cmake &> /dev/null; then
missing+=("cmake")
fi

if (( ${#missing[@]} )); then
echo -e "${ERROR}Error: Missing required build tools: ${missing[*]}${NC}"
echo "Please install them and re-run the installer."
exit 1
fi

echo -e "${SUCCESS}✓${NC} Build tools found (make, cmake)"
}

is_root() {
[[ "$(id -u)" -eq 0 ]]
}
Expand Down Expand Up @@ -1185,6 +1205,9 @@ EOF
local should_open_dashboard=false
local skip_onboard=false

# Fail early if required build tools are missing (before any npm commands)
check_build_tools
Copy link

@vercel vercel bot Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_build_tools() is called too early before Homebrew installation on macOS, and unconditionally for npm installs which don't need build tools

Fix on Vercel

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_build_tools() is called too early before Homebrew installation on macOS

Better to fail eariler than installing anything? AFAIU homebrew wouldn't install make or cmake

unconditionally for npm installs which don't need build tools

How would we know which npm installs wouldn't need make or cmake? AFAIU there is no way to know

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You make good points about early failure being preferable to cryptic npm errors, and you're right that npm installs might also need build tools depending on prebuilt binary availability.

However, there's still a practical issue with the current placement: On macOS systems without Xcode CLT, this check will fail and exit before install_homebrew runs. Since brew install make cmake can provide these tools, it would be better to let Homebrew be installed first.

The ideal flow would be:

  1. Install Homebrew (macOS only)
  2. Then check for build tools (with option to auto-install via brew on macOS)
  3. Then proceed with Node.js and openclaw installation

This way, users on macOS get a better experience - the installer can automatically provide the missing tools via Homebrew rather than just failing. Linux users still get the early clear error message.

The current approach works, but it's not as user-friendly as it could be on macOS.


# Step 1: Homebrew (macOS only)
install_homebrew

Expand Down