Fix importing progress status check

This commit is contained in:
David Calavera 2012-03-31 18:50:45 -07:00
parent 73b31b5a3b
commit b0e6085c0b
2 changed files with 2 additions and 0 deletions

View File

@ -173,6 +173,7 @@ module Vagrant
# The progress of the import will be in the last line. Do a greedy # The progress of the import will be in the last line. Do a greedy
# regular expression to find what we're looking for. # regular expression to find what we're looking for.
if current = lines.last[/.+(\d{2})%/, 1] if current = lines.last[/.+(\d{2})%/, 1]
current = current.to_i
if current > last if current > last
last = current last = current
yield current if block_given? yield current if block_given?

View File

@ -173,6 +173,7 @@ module Vagrant
# The progress of the import will be in the last line. Do a greedy # The progress of the import will be in the last line. Do a greedy
# regular expression to find what we're looking for. # regular expression to find what we're looking for.
if current = lines.last[/.+(\d{2})%/, 1] if current = lines.last[/.+(\d{2})%/, 1]
current = current.to_i
if current > last if current > last
last = current last = current
yield current if block_given? yield current if block_given?