fix(restart-bot): brace-delimit $BOT_PLIST before U+2026 ellipsis (set -u unbound var)#129
Merged
Merged
Conversation
…t -u unbound var)
`log "...$BOT_PLIST…"` (lines 153, 249) abuts the variable directly against a
U+2026 ellipsis. Under bash 5.3.9 + `set -u`, the first byte of the multibyte
ellipsis (0xE2) is absorbed into the variable name, so bash dereferences
`BOT_PLIST<0xE2>` — an unset name — and aborts:
restart-bot.sh: line 153: BOT_PLIST<U+2026-byte>: unbound variable
This breaks the canonical `--plist` restart path on bash 5.3.9 and is the cause
of the 5 failing full-suite tests. Fix: `${BOT_PLIST}…` (brace-delimit the name).
Verified on system bash 5.3.9: the bare form errors under `set -u`; the braced
form prints correctly. bash -n clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Fixes a bash set -u failure in restart-bot.sh where $BOT_PLIST directly precedes a U+2026 ellipsis, causing bash to treat the first byte of the ellipsis as part of the variable name and abort with an “unbound variable” error. This restores the restart-bot.sh --plist path under bash 5.3.9.
Changes:
- Brace-delimit
BOT_PLISTin the “Validating plist…” log message (${BOT_PLIST}…). - Brace-delimit
BOT_PLISTin the “Bootstrapping…” log message (${BOT_PLIST}…).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Bug
bot/scripts/restart-bot.shlines 153 & 249 write"...$BOT_PLIST…"— the variable abuts a U+2026 ellipsis with no delimiter. Under bash 5.3.9 +set -uthe first byte of the multibyte ellipsis (0xE2) is absorbed into the variable name, so bash dereferencesBOT_PLIST<0xE2>(an unset name) and aborts:This breaks the canonical
restart-bot.sh --plistrestart path on bash 5.3.9 and is the root cause of 5 failing full-suite tests.Fix
${BOT_PLIST}…— brace-delimit the variable name so the ellipsis bytes stay literal. Applied to both occurrences (lines 153, 249). The other…log lines already use${VAR}…or$VAR(space-delimited) and are unaffected.Verification (system bash 5.3.9)
bash -nclean. Found incidentally during the Pi RPC Plan A migration work (it surfaced as 5 pre-existing full-suite failures, byte-identical to main, outside that plan's scope — fixed here separately).🤖 Generated with Claude Code