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
 | 
			
		||||
        run: brew install-bundler-gems
 | 
			
		||||
 | 
			
		||||
      - name: Install shellcheck
 | 
			
		||||
        run: brew install shellcheck
 | 
			
		||||
 | 
			
		||||
      - run: brew style --display-cop-names
 | 
			
		||||
 | 
			
		||||
      - run: brew man --fail-if-changed
 | 
			
		||||
 | 
			
		||||
@ -162,12 +162,13 @@ module Homebrew
 | 
			
		||||
    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?
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user