if (result.stdout) {
process.stdout.write(result.stdout);
} if (result.stderr) {
process.stderr.write(result.stderr);
} if (result.error) {
console.error(`command failed: ${command}: ${result.error.message}`);
process.exit(1);
} if (result.signal) {
console.error(`command terminated: ${command}: ${result.signal}`);
process.exit(1);
}
process.exit(result.status ?? 0);
NODE
}
restore_dist_from_image() {
local image="$1"
local container_id
echo"==> Reuse dist/ from Docker image: $image"
container_id="$(docker create "$image")" rm -rf "$ROOT_DIR/dist" if ! docker cp"${container_id}:/app/dist""$ROOT_DIR/dist"; then
docker rm -f "$container_id" >/dev/null 2>&1 || true
return 1 fi
docker rm -f "$container_id" >/dev/null
}
resolve_package_tgz() { if [ -n "$PACKAGE_TGZ" ]; then if [ ! -f "$PACKAGE_TGZ" ]; then echo"OPENCLAW_BUN_GLOBAL_SMOKE_PACKAGE_TGZ does not exist: $PACKAGE_TGZ" >&2
exit 1 fi
PACKAGE_TGZ="$(cd "$(dirname "$PACKAGE_TGZ")" && pwd)/$(basename "$PACKAGE_TGZ")"
return 0 fi
if [ -n "$DIST_IMAGE" ]; then
restore_dist_from_image "$DIST_IMAGE" elif [ "$HOST_BUILD" != "0" ]; then echo"==> Build host package artifacts"
pnpm build else echo"==> Skipping host build (OPENCLAW_BUN_GLOBAL_SMOKE_HOST_BUILD=0)" fi
if [ ! -d "$ROOT_DIR/dist" ]; then echo"dist/ is missing; run pnpm build or set OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE" >&2
exit 1 fi
echo"==> Bun global install packed OpenClaw" "$bun_path" install -g "$PACKAGE_TGZ" --no-progress
openclaw_bin="$BUN_INSTALL/bin/openclaw" if [ ! -x "$openclaw_bin" ]; then
openclaw_bin="$(command -v openclaw || true)" fi if [ -z "$openclaw_bin" ] || [ ! -x "$openclaw_bin" ]; then echo"Bun global install did not create an executable openclaw binary" >&2
exit 1 fi
echo"==> OpenClaw version through Bun global install"
run_with_timeout "$COMMAND_TIMEOUT_MS""$openclaw_bin" --version
echo"==> OpenClaw image providers through Bun global install"
local providers_json
providers_json="$(run_with_timeout "$COMMAND_TIMEOUT_MS" "$openclaw_bin" infer image providers --json)"
OPENCLAW_IMAGE_PROVIDERS_JSON="$providers_json" node - <<'NODE'
const raw = process.env.OPENCLAW_IMAGE_PROVIDERS_JSON ?? "";
let parsed;
try {
parsed = JSON.parse(raw);
} catch (error) {
console.error(raw);
throw new Error(`image providers output is not JSON: ${error.message}`);
} if (!Array.isArray(parsed)) {
throw new Error("image providers output must be a JSON array");
} if (parsed.length === 0) {
throw new Error("image providers output is empty");
}
const ids = new Set(parsed.map((entry) => entry && typeof entry.id === "string" ? entry.id : "")); for (const expected of ["google", "openai", "xai"]) { if (!ids.has(expected)) {
throw new Error(`image providers output is missing bundled provider '${expected}'`);
}
}
console.log(`bun-global-install-smoke: image providers OK (${parsed.length} providers)`);
NODE
}
main "$@"
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-04-27)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.