Merge pull request #10192 from Rylan12/ubuntu-latest-fixes
style shellcheck fixes (in preparation for ubuntu-20.04)
This commit is contained in:
commit
d526772d04
3
.github/workflows/tests.yml
vendored
3
.github/workflows/tests.yml
vendored
@ -26,6 +26,9 @@ jobs:
|
|||||||
- name: Install Bundler RubyGems
|
- name: Install Bundler RubyGems
|
||||||
run: brew install-bundler-gems
|
run: brew install-bundler-gems
|
||||||
|
|
||||||
|
- name: Install shellcheck
|
||||||
|
run: brew install shellcheck
|
||||||
|
|
||||||
- run: brew style --display-cop-names
|
- run: brew style --display-cop-names
|
||||||
|
|
||||||
- run: brew man --fail-if-changed
|
- run: brew man --fail-if-changed
|
||||||
|
|||||||
@ -162,12 +162,13 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def run_shellcheck(files, output_type)
|
def run_shellcheck(files, output_type)
|
||||||
shellcheck = which("shellcheck")
|
shellcheck = Formula["shellcheck"].opt_bin/"shellcheck" if Formula["shellcheck"].any_version_installed?
|
||||||
|
shellcheck ||= which("shellcheck")
|
||||||
shellcheck ||= which("shellcheck", ENV["HOMEBREW_PATH"])
|
shellcheck ||= which("shellcheck", ENV["HOMEBREW_PATH"])
|
||||||
shellcheck ||= begin
|
shellcheck ||= begin
|
||||||
ohai "Installing `shellcheck` for shell style checks..."
|
ohai "Installing `shellcheck` for shell style checks..."
|
||||||
safe_system HOMEBREW_BREW_FILE, "install", "shellcheck"
|
safe_system HOMEBREW_BREW_FILE, "install", "shellcheck"
|
||||||
which("shellcheck") || which("shellcheck", ENV["HOMEBREW_PATH"])
|
Formula["shellcheck"].opt_bin/"shellcheck"
|
||||||
end
|
end
|
||||||
|
|
||||||
if files.empty?
|
if files.empty?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user