test_e2e.sh: declare restore_opts and assign separately

This avoids masking return values. Fixes SC2155. Part of #891.
This commit is contained in:
Raúl Benencia 2024-06-23 16:07:27 -07:00
parent 8eb31d5f65
commit ebfee4000d
1 changed files with 2 additions and 1 deletions

View File

@ -3497,7 +3497,8 @@ function run_test() {
shift
declare -g "$retvar"
local restore_opts=$(set +o)
local restore_opts
restore_opts=$(set +o)
set +o errexit
set +o nounset
set +o pipefail