Fix empty set detection
A friendly error message here was a last minute addition, but untested and as it turns out broken. Due to piping the loop executes in a subshell and thus meta_prefix always retains its original value at the time of check. Instead actually test for anything being written out.
This commit is contained in:
parent
3947cad9ee
commit
c992995adb
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ cat "$cached_list" \
|
|||
fi
|
||||
done
|
||||
|
||||
if [ "$meta_prefix" = "{" ] ; then
|
||||
if [ "$(wc -l "$META_ADD" | cut -d ' ' -f 1)" = "0" ] ; then
|
||||
echo "No emoji matched search criteria"
|
||||
rm "$META_ADD"
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue