do not report errors on missing gemset

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-11-07 18:10:15 +01:00
parent 347c620eed
commit 13d6644966

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2012 Evax Software <contact@evax.fr>
# 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