Skip to content

feat: check archive tooling before download#10

Merged
BartoszBlizniak merged 2 commits into
mainfrom
feat/preflight-installer-tools
Jul 21, 2026
Merged

feat: check archive tooling before download#10
BartoszBlizniak merged 2 commits into
mainfrom
feat/preflight-installer-tools

Conversation

@BartoszBlizniak

Copy link
Copy Markdown
Member

Summary

  • check archive extraction and SHA-256 tooling before downloading a release
    archive
  • select the extraction check from the manifest's actual archive format:
    tar and gzip for tarballs, or unzip for ZIP files
  • preserve reuse of an existing verified installation without requiring tools
    that are only needed for a new archive
  • verify that missing tools produce a clear error after manifest resolution and
    before any archive request

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Other (please describe)

Validation

  • sh -n install.sh
  • shellcheck --shell=sh --severity=style install.sh
  • bats tests/ — 45 tests passed
  • missing-tar coverage confirms that the manifest is requested but the
    release archive is not
  • missing-checksum-tool coverage confirms that the manifest is requested but
    the release archive is not
  • git diff --check

Compatibility

No changes to supported targets, command-line options, environment variables,
installation paths, or the four-line output contract. Installations missing a
required archive or checksum tool now fail before transferring the release
archive instead of failing afterward.

The installer does not reject BusyBox tar by name. Its documented tar applet
supports the t, x, v, z, f, and C operations used here, while the
existing archive validation and extraction steps remain authoritative.

Checklist

  • I have added or updated tests where appropriate.
  • I have updated documentation and CHANGELOG.md where appropriate.
  • I have not included credentials, tokens, or other sensitive data.
  • I have called out any breaking change explicitly.

@BartoszBlizniak
BartoszBlizniak marked this pull request as ready for review July 20, 2026 17:23
@BartoszBlizniak
BartoszBlizniak requested a review from a team as a code owner July 20, 2026 17:23
Copilot AI review requested due to automatic review settings July 20, 2026 17:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

  • Adds a preflight step to install.sh so required archive-extraction and SHA-256 verification tools are validated after manifest resolution but before downloading the release archive, avoiding unnecessary transfers when tooling is missing.
  • Extends the Bats test suite to assert the manifest is fetched while the release archive is not requested when tar or checksum tooling is unavailable, and updates docs/changelog to describe the behavior.

Changes:

  • Add check_archive_tools preflight in install.sh and invoke it before download_archive.
  • Add Bats coverage for “missing tar” and “missing checksum tool” pre-download failure behavior.
  • Document the new preflight behavior in README.md and CHANGELOG.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
install.sh Adds preflight validation of archive + checksum tooling before archive download.
tests/install.bats Adds regression tests ensuring missing tools fail before archive download.
README.md Documents the post-manifest, pre-download tooling checks.
CHANGELOG.md Notes the new preflight tool-check behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread install.sh Outdated
Comment thread install.sh Outdated
Comment thread README.md Outdated
check_archive_tools also validated SHA-256 tooling, so rename it to
check_required_tools; document the conditional tar/gzip vs unzip requirement
in the README.
@BartoszBlizniak
BartoszBlizniak merged commit 88fb9ce into main Jul 21, 2026
11 checks passed
@BartoszBlizniak
BartoszBlizniak deleted the feat/preflight-installer-tools branch July 22, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants