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 committed by Tim Hockin
parent 3200ee55f6
commit 81a4409a04
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