lib/dev-lxc/container.rb in dev-lxc-0.2.0 vs lib/dev-lxc/container.rb in dev-lxc-0.2.1
- old
+ new
@@ -46,10 +46,10 @@
LXC.run_command(command)
end
end
def install_package(package_path)
- raise "File #{package_path} does not exist in container #{self.name}" unless run_command("test -e #{package_path}")
+ raise "File #{package_path} does not exist in container #{self.name}" unless run_command("test -e #{package_path}") == 0
puts "Installing #{package_path} in container #{self.name}"
case File.extname(package_path)
when ".deb"
install_command = "dpkg -D10 -i #{package_path}"
when ".rpm"