Merge pull request #13684 from MikeMcQuaid/rubocop_cmd_fixes
dev-cmd/rubocop: use bundle check.
This commit is contained in:
commit
5ac30ed2ef
@ -13,13 +13,16 @@ homebrew-rubocop() {
|
||||
|
||||
GEM_VERSION="$("${HOMEBREW_RUBY_PATH}" "${RUBY_DISABLE_OPTIONS}" -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')"
|
||||
GEM_HOME="${HOMEBREW_LIBRARY}/Homebrew/vendor/bundle/ruby/${GEM_VERSION}"
|
||||
BUNDLE_GEMFILE="${HOMEBREW_LIBRARY}/Homebrew/Gemfile"
|
||||
|
||||
if ! [[ -f "${GEM_HOME}/bin/rubocop" ]]
|
||||
export GEM_HOME
|
||||
export BUNDLE_GEMFILE
|
||||
|
||||
if ! bundle check &>/dev/null
|
||||
then
|
||||
"${HOMEBREW_BREW_FILE}" install-bundler-gems
|
||||
fi
|
||||
|
||||
export GEM_HOME
|
||||
export PATH="${GEM_HOME}/bin:${PATH}"
|
||||
|
||||
RUBOCOP="${HOMEBREW_LIBRARY}/Homebrew/utils/rubocop.rb"
|
||||
|
Loading…
x
Reference in New Issue
Block a user