Problem
Running wpcc --help (or check-performance.sh --help) displays:
VERSION:
WP Code Check v$SCRIPT_VERSION
Should display:
VERSION:
WP Code Check v2.0.14
Root cause
dist/bin/check-performance.sh line 405:
show_help() {
cat << 'EOF'
The single quotes around EOF create a quoted heredoc, which tells bash to print everything literally without variable expansion. Line 508 contains $SCRIPT_VERSION but it's never expanded because of the quoting.
Fix
Change line 405 from:
to:
This allows $SCRIPT_VERSION (defined at line 78 as SCRIPT_VERSION="2.0.14") to be expanded in the help text output.
Note: When removing the quotes, check that the rest of the heredoc doesn't contain other $ characters that would be unintentionally expanded. A quick scan shows no other $ references in the help text block (lines 406-509), so this change is safe.
🤖 Generated with Claude Code
Problem
Running
wpcc --help(orcheck-performance.sh --help) displays:Should display:
Root cause
dist/bin/check-performance.shline 405:The single quotes around
EOFcreate a quoted heredoc, which tells bash to print everything literally without variable expansion. Line 508 contains$SCRIPT_VERSIONbut it's never expanded because of the quoting.Fix
Change line 405 from:
cat << 'EOF'to:
cat << EOFThis allows
$SCRIPT_VERSION(defined at line 78 asSCRIPT_VERSION="2.0.14") to be expanded in the help text output.Note: When removing the quotes, check that the rest of the heredoc doesn't contain other
$characters that would be unintentionally expanded. A quick scan shows no other$references in the help text block (lines 406-509), so this change is safe.🤖 Generated with Claude Code