Check if graphiql-rails is installed before installing it via gem command

This commit is contained in:
Pirate Praveen 2022-05-08 18:48:40 +05:30
parent b3b01277af
commit d33c0052e7
No known key found for this signature in database
GPG key ID: 8F53E0193B294B75

View file

@ -63,7 +63,7 @@ export GEM_HOME=/var/lib/gitlab/.gem
export GEM_PATH=$(gem env gempath)
# Updating these rubygem packages are complicated
runuser -u ${gitlab_user} -- sh -c "gem install -v 1.8.0 graphiql-rails"
runuser -u ${gitlab_user} -- sh -c "if ! gem list -i -v 1.8.0 "^graphiql-rails$" >/dev/null; then gem install -v 1.8.0 graphiql-rails; fi"
#######################################################################
# update Gemfile.lock and yarn.lock, always