惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Jina AI
Jina AI
The Cloudflare Blog
V
Visual Studio Blog
博客园_首页
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
博客园 - 司徒正美
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
V
V2EX
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
博客园 - Franky

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(docker): bound telegram npm installs · openclaw/openc...
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -240,18 +240,30 @@ package_label="${OPENCLAW_NPM_TELEGRAM_PACKAGE_LABEL:-$install_source}"

240240

echo "Installing ${package_label} from ${install_source}..."

241241
242242

npm_install_timeout="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-600s}"

243-

if [ -z "$npm_install_timeout" ] || [ "$npm_install_timeout" = "0" ]; then

244-

npm install -g "$install_source" --no-fund --no-audit

245-

elif command -v timeout >/dev/null 2>&1; then

246-

if timeout --kill-after=1s 1s true >/dev/null 2>&1; then

247-

timeout --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

243+

run_npm_install() {

244+

if [ -z "$npm_install_timeout" ] || [ "$npm_install_timeout" = "0" ]; then

245+

npm install -g "$install_source" --no-fund --no-audit

246+

return

247+

fi

248+
249+

local timeout_bin=""

250+

if command -v timeout >/dev/null 2>&1; then

251+

timeout_bin="timeout"

252+

elif command -v gtimeout >/dev/null 2>&1; then

253+

timeout_bin="gtimeout"

254+

fi

255+

if [ -z "$timeout_bin" ]; then

256+

echo "timeout or gtimeout is required for OPENCLAW_E2E_NPM_INSTALL_TIMEOUT=$npm_install_timeout" >&2

257+

return 127

258+

fi

259+
260+

if "$timeout_bin" --kill-after=1s 1s true >/dev/null 2>&1; then

261+

"$timeout_bin" --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

248262

else

249-

timeout "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

263+

"$timeout_bin" "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

250264

fi

251-

else

252-

echo "timeout command not found; running package install without OPENCLAW_E2E_NPM_INSTALL_TIMEOUT" >&2

253-

npm install -g "$install_source" --no-fund --no-audit

254-

fi

265+

}

266+

run_npm_install

255267
256268

command -v openclaw

257269

openclaw --version

Original file line numberDiff line numberDiff line change

@@ -264,18 +264,30 @@ install_source="${OPENCLAW_NPM_TELEGRAM_INSTALL_SOURCE:?missing OPENCLAW_NPM_TEL

264264

package_label="${OPENCLAW_NPM_TELEGRAM_PACKAGE_LABEL:-$install_source}"

265265
266266

npm_install_timeout="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-600s}"

267-

if [ -z "$npm_install_timeout" ] || [ "$npm_install_timeout" = "0" ]; then

268-

npm install -g "$install_source" --no-fund --no-audit

269-

elif command -v timeout >/dev/null 2>&1; then

270-

if timeout --kill-after=1s 1s true >/dev/null 2>&1; then

271-

timeout --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

267+

run_npm_install() {

268+

if [ -z "$npm_install_timeout" ] || [ "$npm_install_timeout" = "0" ]; then

269+

npm install -g "$install_source" --no-fund --no-audit

270+

return

271+

fi

272+
273+

local timeout_bin=""

274+

if command -v timeout >/dev/null 2>&1; then

275+

timeout_bin="timeout"

276+

elif command -v gtimeout >/dev/null 2>&1; then

277+

timeout_bin="gtimeout"

278+

fi

279+

if [ -z "$timeout_bin" ]; then

280+

echo "timeout or gtimeout is required for OPENCLAW_E2E_NPM_INSTALL_TIMEOUT=$npm_install_timeout" >&2

281+

return 127

282+

fi

283+
284+

if "$timeout_bin" --kill-after=1s 1s true >/dev/null 2>&1; then

285+

"$timeout_bin" --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

272286

else

273-

timeout "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

287+

"$timeout_bin" "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit

274288

fi

275-

else

276-

echo "timeout command not found; running package install without OPENCLAW_E2E_NPM_INSTALL_TIMEOUT" >&2

277-

npm install -g "$install_source" --no-fund --no-audit

278-

fi

289+

}

290+

run_npm_install

279291

command -v openclaw

280292

openclaw --version

281293

node -p "require('/npm-global/lib/node_modules/openclaw/package.json').version"

Original file line numberDiff line numberDiff line change

@@ -44,13 +44,19 @@ describe("package Telegram live Docker E2E", () => {

4444

'-e OPENCLAW_E2E_NPM_INSTALL_TIMEOUT="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-600s}"',

4545

);

4646

expect(installRun).toContain(

47-

'timeout --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

47+

'"$timeout_bin" --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

4848

);

49-

expect(installRun).toContain("timeout --kill-after=1s 1s true >/dev/null 2>&1");

49+

expect(installRun).toContain('elif command -v gtimeout >/dev/null 2>&1; then');

50+

expect(installRun).toContain("timeout_bin=\"gtimeout\"");

5051

expect(installRun).toContain(

51-

'timeout "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

52+

'echo "timeout or gtimeout is required for OPENCLAW_E2E_NPM_INSTALL_TIMEOUT=$npm_install_timeout" >&2',

53+

);

54+

expect(installRun).toContain('"$timeout_bin" --kill-after=1s 1s true >/dev/null 2>&1');

55+

expect(installRun).toContain(

56+

'"$timeout_bin" "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

5257

);

5358

expect(installRun).toContain('npm install -g "$install_source" --no-fund --no-audit');

59+

expect(installRun).not.toContain("running package install without OPENCLAW_E2E_NPM_INSTALL_TIMEOUT");

5460

expect(installRun).toContain('"${package_mount_args[@]}"');

5561

expect(installRun).not.toContain('"${docker_env[@]}"');

5662

expect(installRun).toContain("run_logged docker_e2e_docker_run_cmd run --rm");

Original file line numberDiff line numberDiff line change

@@ -147,12 +147,18 @@ describe("RTT harness", () => {

147147

'-e OPENCLAW_E2E_NPM_INSTALL_TIMEOUT="${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-600s}"',

148148

);

149149

expect(script).toContain(

150-

'timeout --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

150+

'"$timeout_bin" --kill-after=30s "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

151151

);

152-

expect(script).toContain("timeout --kill-after=1s 1s true >/dev/null 2>&1");

152+

expect(script).toContain('elif command -v gtimeout >/dev/null 2>&1; then');

153+

expect(script).toContain("timeout_bin=\"gtimeout\"");

153154

expect(script).toContain(

154-

'timeout "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

155+

'echo "timeout or gtimeout is required for OPENCLAW_E2E_NPM_INSTALL_TIMEOUT=$npm_install_timeout" >&2',

155156

);

157+

expect(script).toContain('"$timeout_bin" --kill-after=1s 1s true >/dev/null 2>&1');

158+

expect(script).toContain(

159+

'"$timeout_bin" "$npm_install_timeout" npm install -g "$install_source" --no-fund --no-audit',

160+

);

161+

expect(script).not.toContain("running package install without OPENCLAW_E2E_NPM_INSTALL_TIMEOUT");

156162

expect(script).toContain("run_logged docker_e2e_docker_run_cmd run --rm");

157163

expect(script).not.toContain("run_logged docker run --rm");

158164

expect(heartbeatStartIndex).toBeGreaterThan(sourceIndex);