Merge pull request #853 from calavera/fix_progress_status
Fix importing progress status check
This commit is contained in:
commit
fa14133ceb
|
@ -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?
|
||||||
|
|
|
@ -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?
|
||||||
|
@ -385,7 +386,7 @@ module Vagrant
|
||||||
def read_vms
|
def read_vms
|
||||||
results = []
|
results = []
|
||||||
execute("list", "vms", :retryable => true).split("\n").each do |line|
|
execute("list", "vms", :retryable => true).split("\n").each do |line|
|
||||||
if vm line[/^".+?" \{(.+?)\}$/, 1]
|
if vm = line[/^".+?" \{(.+?)\}$/, 1]
|
||||||
results << vm
|
results << vm
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue