fix(selftests): stop the pipefail selftest heading from dumping the shell environment - #452
Open
LukasWodka wants to merge 1 commit into
Open
fix(selftests): stop the pipefail selftest heading from dumping the shell environment#452LukasWodka wants to merge 1 commit into
LukasWodka wants to merge 1 commit into
Conversation
… dumping the environment Inside double quotes the backticks were a command substitution, so bash ran the builtin `set` and the heading printed every shell variable and function body into the CI log. Single-quoted now; the assertions were never affected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2cdd3c1. Configure here.
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.
One heading in
scripts/tests/pipefail-early-close-selftest.sh(line 160) was written in double quotes with backticks aroundset, so bash ran the builtinsetas a command substitution and the heading printed the entire shell environment — every variable, including any tokens present in the runner environment, and every function body — instead of the words. Assertions were never affected; only the log was.Fix: single-quote the heading so it prints literally. The only other backtick heading in the selftests (line 771) was already escaped;
grep -nE '(echo|printf) +"[^"]*\' scripts/tests/*.sh` finds nothing else.Verification:
bash -con the new line prints the heading verbatim;shellcheck -S warning -xandbash -nclean;make selftest-pipefail-early-closelocally: 168 passed, 0 failed — the heading now appears as text with nothing following it.Note
Low Risk
Test-only logging fix with no production or assertion behavior changes.
Overview
Fixes a selftest log heading that accidentally ran the shell
setbuiltin via backticks inside double quotes, so CI/local logs printed the entire environment instead of the section title.The change single-quotes the
echofor== a \set` line carries code too ...` so backticks are literal. Test assertions are unchanged; only output formatting is fixed.Reviewed by Cursor Bugbot for commit 2cdd3c1. Bugbot is set up for automated code reviews on this repo. Configure here.