Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
handle unamed snapshot correctly for rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
madAndroid committed Sep 23, 2014
1 parent c039bb6 commit a9a3283
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ def initialize(app, env)
def call(env)

if env[:snap_name].nil?
env[:snap_name] = env[:machine].provider.driver.snapshot_list.last
snap_name = env[:machine].provider.driver.snapshot_list.last
else
snap_name = env[:snap_name]
end

env[:result] = env[:machine].provider.driver.has_snapshot?(env[:snap_name])
env[:result] = env[:machine].provider.driver.has_snapshot?(snap_name)

@app.call(env)

Expand Down

0 comments on commit a9a3283

Please sign in to comment.