Skip to content

Commit

Permalink
Don't debug print local variable declarations
Browse files Browse the repository at this point in the history
Local variables usually are used for internal purposes and printing them
makes little sense.

Signed-off-by: Mike Kolesnik <[email protected]>
  • Loading branch information
mkolesnik authored and dfarrell07 committed Jun 9, 2021
1 parent 5bb5199 commit 3001be8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/shared/lib/debug_functions
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ NO_COLOR=$(echo -e '\e[0m')

function trap_commands() {
# Function to print each bash command before it is executed
trap '! [[ "$BASH_COMMAND" =~ ^(echo|read|\[|while|for) ]] &&
trap '! [[ "$BASH_COMMAND" =~ ^(echo|read|\[|while|for|local) ]] &&
ctxt="${cluster:+[${cluster}]}" &&
cmd=`eval echo "[${PWD##*/}]\$ $ctxt $BASH_COMMAND" 2>/dev/null` &&
echo "${CYAN_COLOR}$cmd${NO_COLOR}" >&2; true' DEBUG
Expand Down

0 comments on commit 3001be8

Please sign in to comment.