You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BREAKING CHANGE: Current variable setting now defaults to
--pass-by-ref
Objects, arrays, and strings (sine a few commits ago), are set by
passing in the name of the variable that holds either the object, array,
or string. bash-object would copy that info into the new location
correctly. Now, we force the consumer to pass --pass-by-ref due to the
introduction of the --pass-by-value option. --pass-by-value has not been
implemented yet
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
77
-
return
78
-
fi
79
-
elif [ "$final_value_type"== array ];then
80
-
if [ "$actual_final_value_type"!= array ];then
81
-
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
76
+
if [ "$flag_pass_by_what"='by-ref' ];then
77
+
# Ensure the 'final_value' is the same type as specified by the user
bash_object.util.die 'ERROR_VALUE_NOT_FOUND'"The variable '$final_value' does not exist"
82
81
return
83
82
fi
84
-
elif [ "$final_value_type"== string ];then
85
-
if [ "$actual_final_value_type"!= string ];then
86
-
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
94
+
return
95
+
fi
96
+
elif [ "$final_value_type"== array ];then
97
+
if [ "$actual_final_value_type"!= array ];then
98
+
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
99
+
return
100
+
fi
101
+
elif [ "$final_value_type"== string ];then
102
+
if [ "$actual_final_value_type"!= string ];then
103
+
bash_object.util.die 'ERROR_VALUE_INCORRECT_TYPE'"Argument 'set-$final_value_type' was specified, but a variable with type '$actual_final_value_type' was passed"
0 commit comments