-
Bug
-
Resolution: Unresolved
-
Minor
-
v0.1.0
-
False
-
-
False
-
-
Description
The setup-cost-mgmt-tls.sh script displays ANSI escape codes as literal text in the final completion summary instead of rendering them as colored terminal output.
Current Behavior
When the script completes, the final summary shows:
\033[0;32m🎉 Cost Management Operator TLS Setup Completed Successfully!\033[0m
\033[0;34mWhat was configured:\033[0m
• ✅ Cost Management Operator installed in namespace: costmanagement-metrics-operator
...
The escape codes (\033[0;32m, \033[0;34m, etc.) appear as literal text instead of producing colored output.
Root Cause
The show_completion_summary() function (lines 820-852) uses cat << EOF heredoc which outputs the color variable expansions as literal strings. The cat command doesn't interpret escape sequences.
Meanwhile, earlier print functions (print_success(), print_status(), etc.) work correctly because they use echo -e which does interpret escape sequences.
Fix
Change the show_completion_summary() function to use echo -e or printf instead of cat, or pipe through a command that interprets escape sequences.
Option 1: Replace cat << EOF with multiple echo -e statements
Option 2: Define color variables using $'...' syntax: GREEN=$'\033[0;32m'
Option 3: Pipe the heredoc output through printf "%b\n"
Workaround
None needed - the script functions correctly, just the visual formatting is affected in the final summary output.
Impact
- Severity: Very Low (cosmetic issue only)
- The script functionality is not affected
- All operations complete successfully
- Only the visual presentation of the completion summary is impacted
Component Information
- Script: scripts/setup-cost-mgmt-tls.sh
- Function: show_completion_summary() (lines 820-852)
- Repository: ros-helm-chart
- Git commit: 8494ecf (current main branch)
Steps to Reproduce
-
- Run ./scripts/setup-cost-mgmt-tls.sh on an OpenShift cluster
2. Wait for the script to complete
3. Observe the final "Setup Complete!" summary output
4. Notice ANSI escape codes are displayed as literal text instead of colored output
- Run ./scripts/setup-cost-mgmt-tls.sh on an OpenShift cluster
- links to