zltod: return error code on fail

This commit is contained in:
zawz 2022-01-14 14:48:53 +01:00
parent 818baf60b8
commit da2c0275d6

View file

@ -64,7 +64,7 @@ then
fi
_LIST=$(lsblk -lnio NAME,LABEL | tr -s ' ')
_SEARCH=$(echo "$_LIST" | grep $GREPARGS "$*" )
_SEARCH=$(echo "$_LIST" | grep $GREPARGS "$*" ) || exit $?
if [ -z "$_SEARCH" ] ## no result
then