File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,13 @@ core._util.trap_handler_common() {
1919 local code=" $2 "
2020
2121 local trap_handlers=
22- IFS=$' \x1C ' read -ra trap_handlers <<< " ${___global_trap_table___[$signal_spec]}"
22+ if [ -n " $BASH_VERSION " ]; then
23+ IFS=$' \x1C ' read -ra trap_handlers <<< " ${___global_trap_table___[$signal_spec]}"
24+ elif [ -n " $ZSH_VERSION " ]; then
25+ IFS=$' \x1C ' read -rA trap_handlers <<< " ${___global_trap_table___[$signal_spec]}"
26+ else
27+ core.panic ' bash-core only supports bash and zsh'
28+ fi
2329
2430 local trap_handler=
2531 for trap_handler in " ${trap_handlers[@]} " ; do
@@ -75,7 +81,7 @@ core._util.validate_signal() {
7581# @internal
7682core._should_print_color () {
7783 local fd=" $1 "
78-
84+
7985 if [ ${NO_COLOR+x} ]; then
8086 return 1
8187 fi
@@ -95,4 +101,4 @@ core._should_print_color() {
95101 fi
96102
97103 return 1
98- }
104+ }
You can’t perform that action at this time.
0 commit comments