Skip to content

Commit

Permalink
Workaround for ksh 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
ko1nksm committed Jun 20, 2020
1 parent 933488e commit 8f2c8e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/core/matchers/satisfy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ shellspec_matcher_satisfy() {

# shellcheck disable=SC2034
IFS=" $IFS" && SHELLSPEC_EXPECT="$*" && IFS=${IFS#?}
( if shellspec_is_identifier "$1"; then
shellspec_puts "${SHELLSPEC_SUBJECT:-}" | (
if shellspec_is_identifier "$1"; then
if [ "${SHELLSPEC_SUBJECT+x}" ]; then
eval "$1=\$SHELLSPEC_SUBJECT"
else
unset "$1" ||:
fi
fi
shellspec_puts "${SHELLSPEC_SUBJECT:-}" | "$@" >&4
) 2>"$SHELLSPEC_SATISFY_STDERR_FILE" &&:
"$@"
) 2>"$SHELLSPEC_SATISFY_STDERR_FILE" >&4 &&:

set -- "$?"
if [ -s "$SHELLSPEC_SATISFY_STDERR_FILE" ]; then
Expand Down

0 comments on commit 8f2c8e2

Please sign in to comment.