From 1b08cfcd0945d1f7c2273d9c56d90a1e456d26aa Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 19 Nov 2015 18:34:31 -0800 Subject: [PATCH] Do not fail if uninstalling lxc/docker-io fails --- plugins/provisioners/docker/cap/debian/docker_install.rb | 2 +- plugins/provisioners/docker/cap/redhat/docker_install.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/provisioners/docker/cap/debian/docker_install.rb b/plugins/provisioners/docker/cap/debian/docker_install.rb index 7b81df0f9..33724f673 100644 --- a/plugins/provisioners/docker/cap/debian/docker_install.rb +++ b/plugins/provisioners/docker/cap/debian/docker_install.rb @@ -7,7 +7,7 @@ module VagrantPlugins machine.communicate.tap do |comm| comm.sudo("apt-get update -qq -y") comm.sudo("apt-get install -qq -y --force-yes curl") - comm.sudo("apt-get purge -qq -y lxc-docker*") + comm.sudo("apt-get purge -qq -y lxc-docker* || true") comm.sudo("curl -sSL https://get.docker.com/ | sh") end end diff --git a/plugins/provisioners/docker/cap/redhat/docker_install.rb b/plugins/provisioners/docker/cap/redhat/docker_install.rb index 9324c8f5b..0a6868b8b 100644 --- a/plugins/provisioners/docker/cap/redhat/docker_install.rb +++ b/plugins/provisioners/docker/cap/redhat/docker_install.rb @@ -6,7 +6,7 @@ module VagrantPlugins def self.docker_install(machine) machine.communicate.tap do |comm| comm.sudo("yum -q -y update") - comm.sudo("yum -q -y remove docker-io*") + comm.sudo("yum -q -y remove docker-io* || true") comm.sudo("curl -sSL https://get.docker.com/ | sh") end