aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/core.bash.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/core.bash.in b/libs/core.bash.in
index fe174d1..2a682ce 100644
--- a/libs/core.bash.in
+++ b/libs/core.bash.in
@@ -32,8 +32,8 @@ check_do() {
die() {
local item funcname="" sourcefile="" lineno="" n e s="yes"
- # Restore stderr if it was redirected
- exec 2>&${ESELECT_STDERR}
+ # Restore stderr
+ [[ -n ${ESELECT_STDERR} ]] && exec 2>&${ESELECT_STDERR}
# do we have a working write_error_msg?
if is_function "write_error_msg"; then