-
Notifications
You must be signed in to change notification settings - Fork 0
wpcc --help shows literal $SCRIPT_VERSION instead of version number #132
Copy link
Copy link
Open
Description
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:
cat << 'EOF'to:
cat << EOFThis 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels