mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(e2e): bound official installer download (#108937)
* fix(e2e): bound official installer download * test(e2e): cover downloaded installer execution * fix(e2e): harden installer download proof Co-authored-by: Alix-007 <li.long15@xydigit.com> * test(e2e): type installer fixture environment --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
This commit is contained in:
@@ -150,15 +150,21 @@ preinstall_previous_version() {
|
||||
fi
|
||||
}
|
||||
|
||||
run_official_installer() {
|
||||
run_official_installer() (
|
||||
local installer
|
||||
# time_phase disables errexit, so setup and download failures must return explicitly.
|
||||
installer="$(mktemp)" || return
|
||||
trap 'rm -f "$installer"' EXIT
|
||||
|
||||
curl -fsSL --connect-timeout 10 --max-time 120 "$INSTALL_URL" -o "$installer" || return
|
||||
if [[ "$INSTALL_TAG" == "beta" ]]; then
|
||||
curl -fsSL "$INSTALL_URL" | OPENCLAW_BETA=1 bash
|
||||
OPENCLAW_BETA=1 bash "$installer"
|
||||
elif [[ "$INSTALL_TAG" != "latest" ]]; then
|
||||
curl -fsSL "$INSTALL_URL" | OPENCLAW_VERSION="$INSTALL_TAG" bash
|
||||
OPENCLAW_VERSION="$INSTALL_TAG" bash "$installer"
|
||||
else
|
||||
curl -fsSL "$INSTALL_URL" | bash
|
||||
bash "$installer"
|
||||
fi
|
||||
}
|
||||
)
|
||||
|
||||
verify_installed_version() {
|
||||
INSTALLED_VERSION="$(openclaw --version 2>/dev/null | head -n 1 | tr -d '\r')"
|
||||
|
||||
Reference in New Issue
Block a user