Fix lib.pager test breaking on CI

This commit is contained in:
Ethan P 2019-12-23 17:52:18 -08:00
parent b98e241fca
commit 98e2077fe2
No known key found for this signature in database
GPG Key ID: 6963FD04F6CF35EA

View File

@ -25,7 +25,11 @@ pager_info() {
pager_test() {
if [[ "$1" = "TTY" ]]; then
script -q /dev/null bash "${BASH_SOURCE[0]}" --execute
if [[ "$(uname -s)" = "Darwin" ]]; then
script -q /dev/null bash "${BASH_SOURCE[0]}" --execute
else
script -q -c "bash $(printf "%q" "${BASH_SOURCE[0]}") --execute" /dev/null
fi
elif [[ "$1" = "FILE" ]]; then
bash "${BASH_SOURCE[0]}" --execute | cat
fi