Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(installer): add missing warn helper#10157

Merged
jdx merged 1 commit into
jdx:mainfrom
risu729:fix/standalone-installer-warn
May 31, 2026
Merged

fix(installer): add missing warn helper#10157
jdx merged 1 commit into
jdx:mainfrom
risu729:fix/standalone-installer-warn

Conversation

@risu729

@risu729 risu729 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Verification

  • git diff --check
  • sh -n packaging/standalone/install.envsubst
  • Reproduced current upstream/main failure with get_checksum and verified this branch emits the warning instead.

Summary by CodeRabbit

  • Chores
    • Enhanced the installation script's logging capabilities with improved warning messages for missing checksums during the installation process.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a warn helper function to the packaging/standalone/install.envsubst script to print warning messages to standard error. There are no review comments, and I have no feedback to provide.

@greptile-apps

greptile-apps Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds the missing warn() shell helper to packaging/standalone/install.envsubst. Without it, any call into the get_checksum fallback paths (unknown OS/arch combos or a non-matching checksum line from the release SHASUMS file) would silently crash the script with a command not found error rather than emitting a human-readable message.

  • Defines warn() using printf '%s\n' "$*" >&2, placed in the existing #region logging setup block alongside debug, info, and error, consistent with where it logically belongs.
  • The printf-over-echo choice and use of $* are both intentional and POSIX-correct for formatting all arguments into a single line on stderr.

Confidence Score: 5/5

Safe to merge — the change adds a single, straightforward function that was already being called but undefined, fixing a latent crash.

The diff is four lines that define warn() using printf '%s ' "$*" >&2. The function is already referenced in seven call sites within get_checksum; without it the script would crash with a command not found error whenever an unrecognized OS/arch or missing checksum is encountered. The implementation is correct, POSIX-portable, and consistent with the surrounding logging helpers.

No files require special attention.

Important Files Changed

Filename Overview
packaging/standalone/install.envsubst Adds the missing warn() helper function used by get_checksum fallback branches; uses printf '%s\n' "$*" matching the original PR review suggestion.

Reviews (1): Last reviewed commit: "fix(installer): add missing warn helper" | Re-trigger Greptile

@risu729 risu729 marked this pull request as ready for review May 31, 2026 15:22
@coderabbitai

coderabbitai Bot commented May 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e8c6002e-0100-4bc1-8324-af5e3138d089

📥 Commits

Reviewing files that changed from the base of the PR and between a0dd654 and f5af54e.

📒 Files selected for processing (1)
  • packaging/standalone/install.envsubst

📝 Walkthrough

Walkthrough

Added a warn() shell function to the standalone installation script that outputs messages to stderr. This enables downstream code paths to emit warnings when checksums are unavailable for specific OS/architecture/extension combinations.

Changes

Installation Script Warning Support

Layer / File(s) Summary
Warn helper function definition
packaging/standalone/install.envsubst
Added a warn() shell function that prints its arguments to stderr, enabling later warn call sites to emit warnings when checksums are missing for a given OS/architecture/extension combination.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A little function hops into the fray,
Whispering warnings, saving the day,
When checksums vanish, no need to despair,
stderr will echo what one needs to care. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a missing warn helper function to the installer script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@jdx jdx merged commit 224375e into jdx:main May 31, 2026
33 checks passed
@risu729 risu729 deleted the fix/standalone-installer-warn branch May 31, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants