mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
chore(script/setup): Add support to RVM. Only evaluate to rbenv if rvm path is not found.
This commit is contained in:
committed by
Pauloparakleto
parent
42520216aa
commit
8b591b7d21
12
script/setup
12
script/setup
@@ -19,11 +19,17 @@ NO_COLOR='\033[0m'
|
||||
|
||||
# Check ruby version
|
||||
RUBY_VERSION=$(cat .ruby-version)
|
||||
if command -v rbenv > /dev/null; then
|
||||
if command -v rbenv > /dev/null && ! command rvm > /dev/null; then
|
||||
./script/rbenv-install.sh
|
||||
elif ! ruby --version | grep $RUBY_VERSION > /dev/null; then
|
||||
fi
|
||||
|
||||
if command rvm > /dev/null; then
|
||||
./script/rvm-install.sh
|
||||
fi
|
||||
|
||||
if ! ruby --version | grep $RUBY_VERSION > /dev/null; then
|
||||
printf "${RED}Open Food Network requires ruby ${RUBY_VERSION}${NO_COLOR}. "
|
||||
printf "Have a look at: https://github.com/rbenv/rbenv\n"
|
||||
printf "Have a look at your ruby version manager: https://github.com/rbenv/rbenv\n or https://rvm.io/"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user