From f51a642dd3bd46d3254c8ac07bcfadf0b7b9ddc2 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 08 Sep 2012 17:58:02 -0400 Subject: Make sure that _ob_return only unsets variables. According to POSIX.1-2008, some conformant shells might try to unset a function if: 1. Neither -f nor -v is specified and 2. A variable by a specified name does not exist. --- diff --git a/lib/common.sh b/lib/common.sh index a11d6e4..73293d7 100644 --- a/lib/common.sh +++ b/lib/common.sh @@ -31,7 +31,7 @@ _ob_local() _ob_return() { # Unset the variables at the top of the stack. - unset ${_OB_STACK_VARS##*|} + unset -v ${_OB_STACK_VARS##*|} # Pop the variable list from the top of the stack. _OB_STACK_VARS="${_OB_STACK_VARS%|*}" -- cgit v0.9.1