From a1f09855c04f4edc9db86864048c554eefc1f5a2 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 12 May 2014 22:16:06 -0400 Subject: [PATCH] `output' expectation handler using aok for PIPESTATUS check --- src/expect-core | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/expect-core b/src/expect-core index a38c467..1d24fb5 100644 --- a/src/expect-core +++ b/src/expect-core @@ -22,6 +22,8 @@ [ -z $__INC_EXPECT_CORE ] || return __INC_EXPECT_CORE=1 +source util + # reserved for our uses exec 99<>/dev/null @@ -86,8 +88,7 @@ _expect--output() } } 99<&0 - # long version in case pipefail isn't supported on the system - [ "${PIPESTATUS[0]}" -eq 0 -a "${PIPESTATUS[1]}" -eq 0 ] + aok "${PIPESTATUS[@]}" } __expect--output-clause()