Skip to content

Commit d12d9f2

Browse files
committed
test_git.sh: declare restore_opts and assign separately
This avoids masking return values. Fixes SC2155. Part of #891.
1 parent 0e81260 commit d12d9f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test_git.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,8 @@ function run_test() {
908908
shift
909909

910910
declare -g "$retvar"
911-
local restore_opts=$(set +o)
911+
local restore_opts
912+
restore_opts=$(set +o)
912913
set +o errexit
913914
set +o nounset
914915
set +o pipefail

0 commit comments

Comments
 (0)