Fixed a bug with returning from entering a hash path.
The bug was caused by using $? with an if block, to get the result of the subroutine tested by that same if conditional. This was always evalutating to the error code given before the conditional, which was 0 (success).
This commit is contained in:
parent
a5de81c5b0
commit
546774f4c5
|
@ -1507,7 +1507,9 @@ fluxion_hash_get_path() {
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
fluxion_hash_unset_path
|
fluxion_hash_unset_path
|
||||||
if ! fluxion_hash_set_path "$@"; then return $?; fi
|
if ! fluxion_hash_set_path "$@"; then
|
||||||
|
return -1 # WARNING: The recent error code is NOT contained in $? here!
|
||||||
|
fi
|
||||||
|
|
||||||
if fluxion_hash_verify "$FluxionHashPath" "$2" "$3"; then
|
if fluxion_hash_verify "$FluxionHashPath" "$2" "$3"; then
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue