Skip to content

Installer acts only after the whole script has arrived #312

Closed

Description

@irzhywau

Part of #89.

Part of #311 (Group B, installer and update). Owner: not assigned. Task base and PR target: develop.

Intended behavior

curl … | bash runs the installer only after bash has received the whole script. A dropped connection produces no partial install and no stopped Runtime.

Current behavior

  • scripts/install.sh (1,320 lines) defines its functions and then runs its body at top level, from step 1 "Check this computer" (line 956) to finish_install (line 1320). Only an early if block is read as one compound command.
  • With curl -fsSL … | bash, bash runs each line as it arrives. If the connection drops part way, bash runs the part it has, and the pipeline's exit status is bash's own: 0.
  • After installer_runtime_control (line 1298), a drop leaves the Runtime stopped with nothing installed.
  • After the binary is installed, a drop skips principal-root-upgrade (lines 1310-1312) and setup, so the gateway refuses to start until the user runs the installer again.
  • scripts/install-bootstrap-test.py tests a truncated binary download, but not a truncated script.

Implementation notes

  • Move every top-level action into main() { … }, and make main "$@" the last line of the file.
  • Keep set -euo pipefail and every __STAMP__ placeholder. scripts/release-signer.py (render_installer, lines 376-390) requires each placeholder, and the signature covers the installer bytes (installer_sha256).
  • The change reaches users only in the next signed release. The CI update hop installs the previous release with that release's own install.sh, so the hop stays valid.

Done means

Verify

python3 scripts/release-platform-input-test.py (runs install-bootstrap-test.py), just ci-local-prepush.

Do this before #313 and #314, which edit the same file.

Activity

  1. added this to the 0.8.0 milestone on Oct 9, 2026
  2. andersalm commented on Oct 13, 2026

    @andersalm
    Contributor

    Shipped in 0.8.0-alpha.15 (PR #343, source aa3d61e).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions