Browse files

Only cleanup if actually exists

  • Loading branch information...
1 parent 527506d commit ddbb4a5502f4e2af11fae0061a677eaef5732355 @horaci horaci committed Jan 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mandy/packer.rb
View
2 lib/mandy/packer.rb
@@ -23,7 +23,7 @@ def self.pack(script, dir, gemfile=nil)
def self.cleanup!(file)
return false unless File.extname(file) == '.tar'
- FileUtils.rm_r(File.dirname(file))
+ FileUtils.rm_r(File.dirname(file)) if File.exists?(File.dirname(file))
end
end
end

0 comments on commit ddbb4a5

Please sign in to comment.