From 6f9001740c4066a895429a1ecabaf664d7891ddb Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sun, 10 Mar 2013 16:14:14 -0400 Subject: [PATCH] hashcache will now exit with non-zero status if requested item cannot be found --- hashcache | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hashcache b/hashcache index d616b03..b0a3879 100755 --- a/hashcache +++ b/hashcache @@ -72,5 +72,9 @@ if [ "$hash" == 'clear' ]; then elif [ "$set" ]; then _cache "$hash" "$set" else - _retrieve "$hash" + result="$( _retrieve "$hash" "$set" )" + echo "$result" + + # exit with negative status if we have no result + [ -n "$result" ] fi