Skip to content

Commit

Permalink
src/winusb: Disable DEBUG trap as it never work as expected
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁 <[email protected]>
  • Loading branch information
brlin-tw committed Jun 5, 2017
1 parent fe6ddca commit 107842f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/winusb
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,9 @@ process_commandline_parameters(){

if [ "${verbose}" = "1" ] && [ "${enable_debug}" != "Y" ]; then
trap 'trap_return "${FUNCNAME[0]}"' RETURN
trap 'trap_debug "${BASH_COMMAND}"' DEBUG

# Disabled due to FIXME
# trap 'trap_debug "${BASH_COMMAND}"' DEBUG
fi

if [ "${enable_debug}" = "Y" ]; then
Expand Down Expand Up @@ -986,6 +988,8 @@ trap_return(){
echo_with_color green ""${FUNCNAME[0]}": INFO: returning from ${returning_function}\n" 1>&2
}; declare -fr trap_return

# FIXME: Debug trap never work as expected, it always
# prints two identical lines somehow.
trap_debug(){
util_check_function_parameters_quantity 1 $#
local -r command_to_be_executed="${1}"
Expand Down

0 comments on commit 107842f

Please sign in to comment.