dev-cmd/rubocop.sh: repair style
This commit is contained in:
parent
3476ca7b8f
commit
0f02def5ac
@ -2,22 +2,27 @@
|
|||||||
#:
|
#:
|
||||||
#: Installs, configures and runs Homebrew's `rubocop`.
|
#: Installs, configures and runs Homebrew's `rubocop`.
|
||||||
|
|
||||||
|
# HOMEBREW_LIBRARY is from the user environment.
|
||||||
|
# HOMEBREW_RUBY_PATH is set by utils/ruby.sh
|
||||||
|
# RUBY_DISABLE_OPTIONS is set by brew.sh
|
||||||
|
# HOMEBREW_BREW_FILE is set by extend/ENV/super.rb
|
||||||
|
# shellcheck disable=SC2154
|
||||||
homebrew-rubocop() {
|
homebrew-rubocop() {
|
||||||
# Don't need shellcheck to follow this `source`.
|
# Don't need shellcheck to follow this `source`.
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
source "$HOMEBREW_LIBRARY/Homebrew/utils/ruby.sh"
|
source "${HOMEBREW_LIBRARY}/Homebrew/utils/ruby.sh"
|
||||||
setup-ruby-path
|
setup-ruby-path
|
||||||
|
|
||||||
GEM_VERSION="$("$HOMEBREW_RUBY_PATH" "$RUBY_DISABLE_OPTIONS" -rrbconfig -e 'puts RbConfig::CONFIG["ruby_version"]')"
|
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"
|
GEM_HOME="${HOMEBREW_LIBRARY}/Homebrew/vendor/bundle/ruby/${GEM_VERSION}"
|
||||||
|
|
||||||
if ! [[ -f "$GEM_HOME/bin/rubocop" ]]; then
|
if ! [[ -f "${GEM_HOME}/bin/rubocop" ]]; then
|
||||||
"$HOMEBREW_BREW_FILE" install-bundler-gems
|
"${HOMEBREW_BREW_FILE}" install-bundler-gems
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GEM_HOME
|
export GEM_HOME
|
||||||
export PATH="$GEM_HOME/bin:$PATH"
|
export PATH="${GEM_HOME}/bin:${PATH}"
|
||||||
|
|
||||||
RUBOCOP="$HOMEBREW_LIBRARY/Homebrew/utils/rubocop.rb"
|
RUBOCOP="${HOMEBREW_LIBRARY}/Homebrew/utils/rubocop.rb"
|
||||||
exec "$HOMEBREW_RUBY_PATH" "$RUBOCOP" "$@"
|
exec "${HOMEBREW_RUBY_PATH}" "${RUBOCOP}" "$@"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user