man: fix Ruby syntax warning

Library/Homebrew/cmd/man.rb:44: warning: assigned but unused variable - commands
This commit is contained in:
Xu Cheng 2016-04-19 15:06:06 +08:00
parent 5d1e648194
commit 2caf7b76bb

View File

@ -41,7 +41,7 @@ module Homebrew
def build_man_page
template = (SOURCE_PATH/"brew.1.md.erb").read
commands = Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}").
Pathname.glob("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}").
sort_by { |source_file| source_file.basename.sub(/\.(rb|sh)$/, "") }.
map { |source_file|
source_file.read.lines.