Fix show-status.sh filter variable and uninitialized pids array #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Two bugs in
show-status.sh:1. Wrong filter variable (line 62)
The node name filter checks
$1instead of$part:Should be checking
$part(the current compose file being iterated). This breaks node filtering by name.2. Uninitialized pids array (line 71)
Should have
declare -a pids=()before use to avoid undefined behavior.Fix
$1to$partin the filter checkdeclare -a pids=()near script startFound during codebase audit