Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style shellcheck fixes (in preparation for ubuntu-20.04) #10192

Merged
merged 3 commits into from Jan 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: Install Bundler RubyGems
run: brew install-bundler-gems

- name: Install shellcheck
run: brew install shellcheck

- run: brew style --display-cop-names

- run: brew man --fail-if-changed
Expand Down
5 changes: 3 additions & 2 deletions Library/Homebrew/style.rb
Expand Up @@ -162,12 +162,13 @@ def run_rubocop(files, output_type,
end

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 ||= begin
ohai "Installing `shellcheck` for shell style checks..."
safe_system HOMEBREW_BREW_FILE, "install", "shellcheck"
which("shellcheck") || which("shellcheck", ENV["HOMEBREW_PATH"])
Formula["shellcheck"].opt_bin/"shellcheck"
end

if files.empty?
Expand Down
2 changes: 1 addition & 1 deletion manpages/brew.1
@@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW" "1" "December 2020" "Homebrew" "brew"
.TH "BREW" "1" "January 2021" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux)
Expand Down