File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ set -euo pipefail
77PREFIX=" ${CLAWDBOT_PREFIX:- ${HOME} / .clawdbot} "
88CLAWDBOT_VERSION=" ${CLAWDBOT_VERSION:- latest} "
99NODE_VERSION=" ${CLAWDBOT_NODE_VERSION:- 22.12.0} "
10+ SHARP_IGNORE_GLOBAL_LIBVIPS=" ${SHARP_IGNORE_GLOBAL_LIBVIPS:- 1} "
1011JSON=0
1112RUN_ONBOARD=0
1213SET_NPM_PREFIX=0
@@ -21,6 +22,9 @@ Usage: install-cli.sh [options]
2122 --onboard Run "clawdbot onboard" after install
2223 --no-onboard Skip onboarding (default)
2324 --set-npm-prefix Force npm prefix to ~/.npm-global if current prefix is not writable (Linux)
25+
26+ Environment variables:
27+ SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 Default: 1 (avoid sharp building against global libvips)
2428EOF
2529}
2630
@@ -202,7 +206,7 @@ install_clawdbot() {
202206 if [[ " $SET_NPM_PREFIX " -eq 1 ]]; then
203207 fix_npm_prefix_if_needed
204208 fi
205- " $( npm_bin) " install -g --prefix " $PREFIX " " clawdbot@${CLAWDBOT_VERSION} "
209+ SHARP_IGNORE_GLOBAL_LIBVIPS= " $SHARP_IGNORE_GLOBAL_LIBVIPS " " $( npm_bin) " install -g --prefix " $PREFIX " " clawdbot@${CLAWDBOT_VERSION} "
206210 rm -f " ${PREFIX} /bin/clawdbot"
207211 cat > " ${PREFIX} /bin/clawdbot" << EOF
208212#!/usr/bin/env bash
Original file line number Diff line number Diff line change @@ -146,6 +146,7 @@ INSTALL_METHOD=${CLAWDBOT_INSTALL_METHOD:-}
146146GIT_DIR_DEFAULT=" ${HOME} /clawdbot"
147147GIT_DIR=${CLAWDBOT_GIT_DIR:- $GIT_DIR_DEFAULT }
148148GIT_UPDATE=${CLAWDBOT_GIT_UPDATE:- 1}
149+ SHARP_IGNORE_GLOBAL_LIBVIPS=" ${SHARP_IGNORE_GLOBAL_LIBVIPS:- 1} "
149150HELP=0
150151
151152print_usage () {
@@ -173,6 +174,7 @@ Environment variables:
173174 CLAWDBOT_NO_PROMPT=1
174175 CLAWDBOT_DRY_RUN=1
175176 CLAWDBOT_NO_ONBOARD=1
177+ SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 Default: 1 (avoid sharp building against global libvips)
176178
177179Examples:
178180 curl -fsSL https://clawd.bot/install.sh | bash
@@ -484,7 +486,7 @@ install_clawdbot_from_git() {
484486 fi
485487 fi
486488
487- pnpm -C " $repo_dir " install
489+ SHARP_IGNORE_GLOBAL_LIBVIPS= " $SHARP_IGNORE_GLOBAL_LIBVIPS " pnpm -C " $repo_dir " install
488490
489491 if ! pnpm -C " $repo_dir " ui:build; then
490492 echo -e " ${WARN} →${NC} UI build failed; continuing (CLI may still work)"
505507# Install Clawdbot
506508install_clawdbot () {
507509 echo -e " ${WARN} →${NC} Installing Clawdbot..."
508- npm install -g clawdbot@latest
510+ if [[ " $SHARP_IGNORE_GLOBAL_LIBVIPS " == " 1" ]]; then
511+ echo -e " ${INFO} i${NC} Using SHARP_IGNORE_GLOBAL_LIBVIPS=1 (avoids sharp source builds against global libvips)"
512+ fi
513+ SHARP_IGNORE_GLOBAL_LIBVIPS=" $SHARP_IGNORE_GLOBAL_LIBVIPS " npm install -g clawdbot@latest
509514 echo -e " ${SUCCESS} ✓${NC} Clawdbot installed"
510515}
511516
You can’t perform that action at this time.
0 commit comments