diff --git a/test/lib/library.exp b/test/lib/library.exp index 4ec0e697..6d2ff41c 100644 --- a/test/lib/library.exp +++ b/test/lib/library.exp @@ -846,7 +846,7 @@ proc save_env {{file ""}} { # @param string File to save the environment to. Default is "$TESTDIR/tmp/env1~". # @see assert_env_unmodified() proc _save_env {{file ""}} { - assert_bash_exec "{ (set -o posix ; set); declare -F; shopt -p; } > \"$file\"" + assert_bash_exec "{ (set -o posix ; set); declare -F; shopt -p; set -o; } > \"$file\"" }