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
|
||||
# regular expression to find what we're looking for.
|
||||
if current = lines.last[/.+(\d{2})%/, 1]
|
||||
current = current.to_i
|
||||
if current > last
|
||||
last = current
|
||||
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
|
||||
# regular expression to find what we're looking for.
|
||||
if current = lines.last[/.+(\d{2})%/, 1]
|
||||
current = current.to_i
|
||||
if current > last
|
||||
last = current
|
||||
yield current if block_given?
|
||||
|
@ -385,7 +386,7 @@ module Vagrant
|
|||
def read_vms
|
||||
results = []
|
||||
execute("list", "vms", :retryable => true).split("\n").each do |line|
|
||||
if vm line[/^".+?" \{(.+?)\}$/, 1]
|
||||
if vm = line[/^".+?" \{(.+?)\}$/, 1]
|
||||
results << vm
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue