Use better pipe check

This commit is contained in:
Arun Prakash Jana 2021-03-28 00:59:23 +05:30
parent ccf2927b6d
commit 8542f5bc33
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -11,7 +11,7 @@
# Shell: POSIX compliant # Shell: POSIX compliant
# Authors: Marty Buchaus, Dave Snider, Tim Adler # Authors: Marty Buchaus, Dave Snider, Tim Adler
if [ -z "$NNN_PIPE" ]; then if [ ! -p "$NNN_PIPE" ]; then
echo 'ERROR: NNN_PIPE is not set' | ${PAGER:-less} echo 'ERROR: NNN_PIPE is not set' | ${PAGER:-less}
exit 2 exit 2
fi fi