refactor: replace non-standard heredoc pattern with standard variable assignment - #221
Merged
Merged
Conversation
…) assignment Agent-Logs-Url: https://github.com/EngineScript/EngineScript/sessions/eddf6576-4f57-42ca-8e4e-0c9b0fe8281e Co-authored-by: PDowney <11467177+PDowney@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix heredoc variable assignment for better readability
refactor: replace non-standard heredoc pattern with standard variable assignment
May 1, 2026
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors admin-control-panel-install.sh to use a more idiomatic heredoc-to-variable assignment style for the embedded awk script used when removing the Adminer tool card from the control panel.
Changes:
- Replaced
read -r -d '' ... <<'EOF' || trueheredoc assignment withVAR=$(cat <<'EOF' ... )for improved readability.
| if [[ "${INSTALL_ADMINER}" -eq 0 ]]; then | ||
| CONTROL_PANEL_INDEX="/var/www/admin/control-panel/index.html" | ||
| read -r -d '' AWK_ADMINER_BLOCK_SCRIPT << 'AWKEOF' || true | ||
| AWK_ADMINER_BLOCK_SCRIPT=$(cat << 'AWKEOF' |
There was a problem hiding this comment.
Project convention requires updating the root CHANGELOG.md whenever the codebase is modified (see .github/copilot-instructions.md:48-53). This PR changes an install script but doesn’t include a CHANGELOG entry; please add one describing the refactor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Software Version Updates
Replaces a non-standard
read -r -d '' VAR << 'EOF' || trueheredoc assignment with the conventionalVAR=$(cat << 'EOF' ... )form inadmin-control-panel-install.sh.Changed Versions
scripts/install/tools/frontend/admin-control-panel-install.shread -r -d ''+|| truetrick for a straightforward command substitution heredocVersion Diff
Verification Checklist
Notes
Semantically equivalent change. The
read -r -d ''pattern relies on the non-zero exit code ofreadbeing suppressed by|| true, which is non-obvious and can confuse static analysis tools and readers alike.$(cat <<'EOF')is idiomatic and immediately readable.Original prompt