style: re-enable shellcheck.
Ensure that `shellcheck` is run by `brew style` again and fix the various failures.
This commit is contained in:
		
							parent
							
								
									99aee97856
								
							
						
					
					
						commit
						15a2abd9df
					
				@ -5,7 +5,7 @@ then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# USER isn't always set so provide a fall back for `brew` and subprocesses.
 | 
			
		||||
export USER=${USER:-`id -un`}
 | 
			
		||||
export USER=${USER:-$(id -un)}
 | 
			
		||||
 | 
			
		||||
# Where we store built products; a Cellar in HOMEBREW_PREFIX (often /usr/local
 | 
			
		||||
# for bottles) unless there's already a Cellar in HOMEBREW_REPOSITORY.
 | 
			
		||||
 | 
			
		||||
@ -56,7 +56,7 @@ module Homebrew
 | 
			
		||||
        File.expand_path(file).start_with? HOMEBREW_LIBRARY_PATH
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      if files && !has_non_formula
 | 
			
		||||
      if files.present? && !has_non_formula
 | 
			
		||||
        config = if files.first && File.exist?("#{files.first}/spec")
 | 
			
		||||
          HOMEBREW_LIBRARY/".rubocop_rspec.yml"
 | 
			
		||||
        else
 | 
			
		||||
@ -65,7 +65,7 @@ module Homebrew
 | 
			
		||||
        args << "--config" << config
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      if files.nil?
 | 
			
		||||
      if files.blank?
 | 
			
		||||
        args << HOMEBREW_LIBRARY_PATH
 | 
			
		||||
      else
 | 
			
		||||
        args += files
 | 
			
		||||
@ -79,7 +79,7 @@ module Homebrew
 | 
			
		||||
      when :print
 | 
			
		||||
        args << "--debug" if Homebrew.args.debug?
 | 
			
		||||
        args << "--display-cop-names" if Homebrew.args.display_cop_names?
 | 
			
		||||
        args << "--format" << "simple" if files
 | 
			
		||||
        args << "--format" << "simple" if files.present?
 | 
			
		||||
        system(cache_env, "rubocop", *args)
 | 
			
		||||
        rubocop_success = $CHILD_STATUS.success?
 | 
			
		||||
      when :json
 | 
			
		||||
@ -100,7 +100,7 @@ module Homebrew
 | 
			
		||||
        raise "Invalid output_type for check_style_impl: #{output_type}"
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      return rubocop_success if files.present? || !has_non_formula
 | 
			
		||||
      return rubocop_success if files.present?
 | 
			
		||||
 | 
			
		||||
      shellcheck   = which("shellcheck")
 | 
			
		||||
      shellcheck ||= which("shellcheck", ENV["HOMEBREW_PATH"])
 | 
			
		||||
 | 
			
		||||
@ -44,7 +44,7 @@ If there's no Homebrew Portable Ruby available for your processor:
 | 
			
		||||
  then
 | 
			
		||||
    HOMEBREW_RUBY_PATH="$vendor_ruby_path"
 | 
			
		||||
    [[ -z "$HOMEBREW_MACOS" ]] && TERMINFO_DIRS="$vendor_ruby_terminfo"
 | 
			
		||||
    if [[ $vendor_ruby_current_version != $vendor_ruby_latest_version ]]
 | 
			
		||||
    if [[ $vendor_ruby_current_version != "$vendor_ruby_latest_version" ]]
 | 
			
		||||
    then
 | 
			
		||||
      if ! brew vendor-install ruby
 | 
			
		||||
      then
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user