Merge pull request #4099 from mitchellh/fix-issue-2476-chef-client-node-cleanup
provisioners/chef: clean bundle env when executing chef client
This commit is contained in:
commit
22395e5cb4
|
@ -104,6 +104,9 @@ module VagrantPlugins
|
|||
"vagrant.provisioners.chef.deleting_from_server",
|
||||
deletable: deletable, name: node_name))
|
||||
|
||||
# Knife is not part of the current Vagrant bundle, so it needs to run
|
||||
# in the context of the system.
|
||||
Bundler.with_clean_env do
|
||||
command = ["knife", deletable, "delete", "--yes", node_name]
|
||||
r = Vagrant::Util::Subprocess.execute(*command)
|
||||
if r.exit_code != 0
|
||||
|
@ -117,4 +120,5 @@ module VagrantPlugins
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue