mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Don't use question marks in struct fields
Apparently it doesn't work in Ruby 1.9.
This commit is contained in:
@@ -12,7 +12,7 @@ SLOW_SUBMODULES = %w[
|
|||||||
vendor/grammars/ioke-outdated
|
vendor/grammars/ioke-outdated
|
||||||
]
|
]
|
||||||
|
|
||||||
class TaskResult < Struct.new(:submodule, :output, :success?); end
|
class TaskResult < Struct.new(:submodule, :output, :status); end
|
||||||
|
|
||||||
def run_process(*args)
|
def run_process(*args)
|
||||||
read, write = IO.pipe
|
read, write = IO.pipe
|
||||||
@@ -21,12 +21,12 @@ def run_process(*args)
|
|||||||
output = read.read
|
output = read.read
|
||||||
read.close
|
read.close
|
||||||
Process.wait(pid)
|
Process.wait(pid)
|
||||||
[output, $?.success?]
|
[output, $?]
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_submodule(submodule)
|
def update_submodule(submodule)
|
||||||
output, success = run_process("git", "submodule", "update", "--", submodule)
|
output, status = run_process("git", "submodule", "update", "--", submodule)
|
||||||
TaskResult.new(submodule, output, success)
|
TaskResult.new(submodule, output, status)
|
||||||
end
|
end
|
||||||
|
|
||||||
def run_thread(submodules, results)
|
def run_thread(submodules, results)
|
||||||
@@ -58,7 +58,7 @@ end
|
|||||||
success = true
|
success = true
|
||||||
SUBMODULES.each do
|
SUBMODULES.each do
|
||||||
result = results.pop
|
result = results.pop
|
||||||
unless result.success?
|
unless result.status.success?
|
||||||
success = false
|
success = false
|
||||||
puts "Error updating #{result.submodule}"
|
puts "Error updating #{result.submodule}"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user