File tree 1 file changed +5
-4
lines changed
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() {
223
223
fi
224
224
225
225
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 ' "
227
227
return
228
228
fi
229
229
local -n global_object=" $global_object_name "
@@ -245,14 +245,15 @@ bash_object.traverse-set() {
245
245
return
246
246
fi
247
247
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 "
250
250
return
251
251
fi
252
+ local -n global_array=" $global_array_name "
253
+ global_array=()
252
254
253
255
current_object[" $key " ]=$' \x1C\x1D ' " type=array;&$global_array_name "
254
256
255
- local -n global_array=" $global_array_name "
256
257
local -n array_to_copy_from=" $final_value "
257
258
258
259
# shellcheck disable=SC2034
You can’t perform that action at this time.
0 commit comments