Commits

Kaspar Schiess  committed 1f80c7b

Fixes zfs_safe_destroy to actually work

  • Participants
  • Parent commits 6c26ca1
  • Tags 0.2.1

Comments (0)

Files changed (2)

File bin/zfs_safe_destroy

 
 def enumerate_objects dataset
   zfs = Mixlib::ShellOut.new(
-    'zfs', 'list -r -t all -Ho name,type ', dataset)
+    'zfs', *%w(list -r -t all -Ho name,type), dataset)
   zfs.run_command
   zfs.error!
 
   summary = Hash.new(0)
 
   zfs.stdout.lines.map do |line|
-    name, _, type = line.chomp.rpartition(' ')
+    name, _, type = line.chomp.rpartition(/\s/)
     name.strip!
 
     next if name.size == 0
   exit(3)
 end
 def zfs_recursive_destroy dataset
-  destroy = Mixlib::ShellOut.new('zfs', 'destroy -r ', dataset)
+  destroy = Mixlib::ShellOut.new('zfs', *%w(destroy -r), dataset)
   destroy.run_command
   destroy.error!
 

File zfs-tools.gemspec

 
 Gem::Specification.new do |s|
   s.name = %q{zfs-tools}
-  s.version = "0.2.0"
+  s.version = "0.2.1"
 
   s.authors = ["Kaspar Schiess"]
   s.email = %q{kaspar.schiess@absurd.li}