File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ bash_object.traverse-set() {
223223 fi
224224
225225 if ! declare -gA " $global_object_name " ; then
226- bash_object.util.die ' ERROR_INTERNAL' ' Eval declare failed '
226+ bash_object.util.die ' ERROR_INTERNAL' " Could not declare variable ' $global_object_name ' "
227227 return
228228 fi
229229 local -n global_object=" $global_object_name "
@@ -245,14 +245,15 @@ bash_object.traverse-set() {
245245 return
246246 fi
247247
248- if ! eval " declare -ga $global_array_name =() " 2> /dev/null ; then
249- bash_object.util.die ' ERROR_INTERNAL' ' Eval declare failed '
248+ if ! declare -ga " $global_array_name " ; then
249+ bash_object.util.die ' ERROR_INTERNAL' " Could not declare variable $global_object_name "
250250 return
251251 fi
252+ local -n global_array=" $global_array_name "
253+ global_array=()
252254
253255 current_object[" $key " ]=$' \x1C\x1D ' " type=array;&$global_array_name "
254256
255- local -n global_array=" $global_array_name "
256257 local -n array_to_copy_from=" $final_value "
257258
258259 # shellcheck disable=SC2034
You can’t perform that action at this time.
0 commit comments