lib/vagrant_snap.rb in vagrant-snap-0.02 vs lib/vagrant_snap.rb in vagrant-snap-0.03
- old
+ new
@@ -111,10 +111,10 @@
def take(target=nil)
with_target(target) do |vmname, vagvmname|
puts "[#{vagvmname}]"
VBox::SnapShot.parse_tree( vmname )
last_name = VBox::SnapShot.snaps.sort.reverse.first
- new_name = last_name.nil? ? vmname + "-01" : last_name.succ
+ new_name = last_name.nil? ? "#{vagvmname}-01" : last_name.succ
desc = options.desc ? " --description '#{options.desc}'" : ""
system "VBoxManage snapshot #{vmname} take #{new_name} #{desc} --pause"
end
end