




















@@ -33,7 +33,7 @@ tar -xzf "$package_tgz" -C "$git_root" --strip-components=1
3333)
3434npm_log="/tmp/openclaw-doctor-switch-npm-install.log"
3535if ! openclaw_e2e_maybe_timeout "${OPENCLAW_E2E_NPM_INSTALL_TIMEOUT:-600s}" npm install -g --prefix /tmp/npm-prefix --omit=optional "$package_tgz" >"$npm_log" 2>&1; then
36-cat "$npm_log"
36+openclaw_e2e_print_log "$npm_log"
3737exit 1
3838fi
3939@@ -136,7 +136,7 @@ run_flow() {
136136export USER="testuser"
137137138138if ! openclaw_e2e_maybe_timeout "$command_timeout" bash -c "$install_cmd" >"$install_log" 2>&1; then
139-cat "$install_log"
139+openclaw_e2e_print_log "$install_log"
140140exit 1
141141fi
142142 rm -f "$HOME/.zshrc" "$HOME/.bashrc" "$HOME/.bash_profile"
@@ -150,7 +150,7 @@ run_flow() {
150150 assert_entrypoint "$unit_path" "$install_expected"
151151152152if ! openclaw_e2e_maybe_timeout "$command_timeout" bash -c "$doctor_cmd" >"$doctor_log" 2>&1; then
153-cat "$doctor_log"
153+openclaw_e2e_print_log "$doctor_log"
154154exit 1
155155fi
156156@@ -187,7 +187,7 @@ run_proxy_env_flow() {
187187 HTTPS_PROXY="https://proxy.local:7890" \
188188 NO_PROXY="localhost,127.0.0.1" \
189189"$npm_bin" gateway install --force >"$install_log" 2>&1; then
190-cat "$install_log"
190+openclaw_e2e_print_log "$install_log"
191191exit 1
192192fi
193193 assert_no_env_key "$unit_path" "HTTP_PROXY"
@@ -200,7 +200,7 @@ run_proxy_env_flow() {
200200 } >>"$unit_path"
201201if ! openclaw_e2e_maybe_timeout "$command_timeout" env OPENCLAW_UPDATE_IN_PROGRESS=1 \
202202 node "$git_cli" doctor --repair --force --yes --non-interactive >"$doctor_log" 2>&1; then
203-cat "$doctor_log"
203+openclaw_e2e_print_log "$doctor_log"
204204exit 1
205205fi
206206 assert_no_env_key "$unit_path" "HTTP_PROXY"
@@ -231,15 +231,15 @@ run_wrapper_flow() {
231231local unit_path="$HOME/.config/systemd/user/openclaw-gateway.service"
232232233233if ! openclaw_e2e_maybe_timeout "$command_timeout" "$npm_bin" gateway install --wrapper "$wrapper" --force >"$install_log" 2>&1; then
234-cat "$install_log"
234+openclaw_e2e_print_log "$install_log"
235235exit 1
236236fi
237237 assert_exec_arg "$unit_path" 1 "$wrapper"
238238 assert_exec_arg "$unit_path" 2 "gateway"
239239 assert_env_value "$unit_path" "OPENCLAW_WRAPPER" "$wrapper"
240240241241if ! openclaw_e2e_maybe_timeout "$command_timeout" "$npm_bin" gateway install --force >"$reinstall_log" 2>&1; then
242-cat "$reinstall_log"
242+openclaw_e2e_print_log "$reinstall_log"
243243exit 1
244244fi
245245 assert_exec_arg "$unit_path" 1 "$wrapper"
@@ -248,34 +248,34 @@ run_wrapper_flow() {
248248249249 sed -i "/^Environment=OPENCLAW_WRAPPER=/d" "$unit_path"
250250if ! openclaw_e2e_maybe_timeout "$command_timeout" "$npm_bin" gateway install --wrapper "$wrapper" >"$env_repair_log" 2>&1; then
251-cat "$env_repair_log"
251+openclaw_e2e_print_log "$env_repair_log"
252252exit 1
253253fi
254254 assert_exec_arg "$unit_path" 1 "$wrapper"
255255 assert_env_value "$unit_path" "OPENCLAW_WRAPPER" "$wrapper"
256256257257 sed -i "s#^Environment=OPENCLAW_WRAPPER=.*#Environment=OPENCLAW_WRAPPER=/tmp/stale-openclaw-wrapper#" "$unit_path"
258258if ! openclaw_e2e_maybe_timeout "$command_timeout" "$npm_bin" gateway install --wrapper "$wrapper" >"$env_repair_log" 2>&1; then
259-cat "$env_repair_log"
259+openclaw_e2e_print_log "$env_repair_log"
260260exit 1
261261fi
262262 assert_exec_arg "$unit_path" 1 "$wrapper"
263263 assert_env_value "$unit_path" "OPENCLAW_WRAPPER" "$wrapper"
264264265265if ! openclaw_e2e_maybe_timeout "$command_timeout" node "$git_cli" doctor --repair --force --yes >"$doctor_log" 2>&1; then
266-cat "$doctor_log"
266+openclaw_e2e_print_log "$doctor_log"
267267exit 1
268268fi
269269if ! grep -Fq "Gateway service invokes OPENCLAW_WRAPPER:" "$doctor_log"; then
270270echo "Expected doctor to report active wrapper"
271-cat "$doctor_log"
271+openclaw_e2e_print_log "$doctor_log"
272272exit 1
273273fi
274274 assert_exec_arg "$unit_path" 1 "$wrapper"
275275 assert_env_value "$unit_path" "OPENCLAW_WRAPPER" "$wrapper"
276276277277if ! openclaw_e2e_maybe_timeout "$command_timeout" env OPENCLAW_WRAPPER= "$npm_bin" gateway install --force >"$clear_log" 2>&1; then
278-cat "$clear_log"
278+openclaw_e2e_print_log "$clear_log"
279279exit 1
280280fi
281281 assert_no_env_key "$unit_path" "OPENCLAW_WRAPPER"
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。