File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ core.trap_add() {
4343 fi
4444 # shellcheck disable=SC2064
4545 trap " $global_trap_handler_name " " $signal_spec "
46- done
46+ done ; unset -v signal_spec
4747}
4848
4949# @description Removes a handler for a particular `trap` signal or event. Currently,
@@ -78,7 +78,7 @@ core.trap_remove() {
7878 fi
7979
8080 new_trap_handlers+=$' \x1C ' " $trap_handler "
81- done ; unset trap_handler
81+ done ; unset -v trap_handler
8282
8383 ___global_trap_table___[" $signal_spec " ]=" $new_trap_handlers "
8484
@@ -91,7 +91,7 @@ core.trap_remove() {
9191 trap -- " $signal_spec "
9292 unset -f " $global_trap_handler_name "
9393 fi
94- done
94+ done ; unset -v signal_spec
9595}
9696
9797# @description Modifies current shell options and pushes information to stack, so
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ core.private.util.trap_handler_common() {
3232 else
3333 core.print_warn " Trap handler function '$trap_handler ' that was registered for signal '$signal_spec ' no longer exists. Skipping" >&2
3434 fi
35- done ; unset trap_func
35+ done ; unset -v trap_handler
3636}
3737
3838core.private.util.validate_args () {
You can’t perform that action at this time.
0 commit comments