File tree Expand file tree Collapse file tree 2 files changed +43
-1
lines changed
Expand file tree Collapse file tree 2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -1451,7 +1451,7 @@ install_openclaw_from_git() {
14511451
14521452 cleanup_legacy_submodules " $repo_dir "
14531453
1454- run_quiet_step " Installing dependencies" env SHARP_IGNORE_GLOBAL_LIBVIPS= " $SHARP_IGNORE_GLOBAL_LIBVIPS " run_pnpm -C " $repo_dir " install
1454+ SHARP_IGNORE_GLOBAL_LIBVIPS= " $SHARP_IGNORE_GLOBAL_LIBVIPS " run_quiet_step " Installing dependencies" run_pnpm -C " $repo_dir " install
14551455
14561456 if ! run_quiet_step " Building UI" run_pnpm -C " $repo_dir " ui:build; then
14571457 ui_warn " UI build failed; continuing (CLI may still work)"
Original file line number Diff line number Diff line change 227227 assert_eq " ${PNPM_CMD[*]} " " pnpm" " ensure_pnpm (npm fallback)"
228228)
229229
230+ echo " ==> case: install_openclaw_from_git (deps step uses run_pnpm function)"
231+ (
232+ root=" ${TMP_DIR} /case-install-git-deps"
233+ repo=" ${root} /repo"
234+ home_dir=" ${root} /home"
235+
236+ mkdir -p " ${repo} /.git" " ${repo} /dist" " ${home_dir} "
237+ : > " ${repo} /dist/entry.js"
238+
239+ export HOME=" ${home_dir} "
240+ GIT_UPDATE=0
241+ SHARP_IGNORE_GLOBAL_LIBVIPS=1
242+
243+ deps_called=0
244+ deps_cmd=" "
245+
246+ check_git () { return 0; }
247+ install_git () { fail " install_git should not be called" ; }
248+ ensure_pnpm () { : ; }
249+ cleanup_legacy_submodules () { : ; }
250+ ensure_user_local_bin_on_path () { mkdir -p " ${HOME} /.local/bin" ; }
251+ run_pnpm () { : ; }
252+ ui_info () { : ; }
253+ ui_success () { : ; }
254+ ui_warn () { : ; }
255+ ui_error () { : ; }
256+
257+ run_quiet_step () {
258+ local _title=" $1 "
259+ shift
260+ if [[ " ${_title} " == " Installing dependencies" ]]; then
261+ deps_called=1
262+ deps_cmd=" ${1:- } "
263+ fi
264+ " $@ " > /dev/null 2>&1 || true
265+ }
266+
267+ install_openclaw_from_git " ${repo} "
268+ assert_eq " $deps_called " " 1" " install_openclaw_from_git dependencies step"
269+ assert_eq " $deps_cmd " " run_pnpm" " install_openclaw_from_git dependencies command"
270+ )
271+
230272echo " OK"
You can’t perform that action at this time.
0 commit comments