From 13d6644966ca8319eef99c49cedd1a8e518a2b1c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Nov 2012 18:10:15 +0100 Subject: [PATCH] do not report errors on missing gemset Signed-off-by: Nico Schottelius --- cdist/conf/type/__rvm_gem/explorer/state | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__rvm_gem/explorer/state b/cdist/conf/type/__rvm_gem/explorer/state index 09509a2e..4146d666 100755 --- a/cdist/conf/type/__rvm_gem/explorer/state +++ b/cdist/conf/type/__rvm_gem/explorer/state @@ -1,6 +1,7 @@ #!/bin/sh # # 2012 Evax Software +# 2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -30,8 +31,8 @@ fi if su - "$user" -c "source \"\$HOME/.rvm/scripts/rvm\" rvm list | grep -q $ruby"; then if su - "$user" -c "source \"\$HOME/.rvm/scripts/rvm\" -rvm use $ruby > /dev/null; rvm gemset list | grep -q $gemsetname && -rvm use $gemset > /dev/null && gem list | grep -q $gem"; then +rvm use $ruby > /dev/null 2>&1; rvm gemset list | grep -q $gemsetname && +rvm use $gemset > /dev/null 2>&1 && gem list | grep -q $gem"; then echo "present" exit 0 fi