mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Vagrant up expects machine data_dir to exist afterwards (#1298)
Ensure the machine data_dir is recreated after removal because vagrant up expects the directory to exist even if there has been an exception and the machine has been deleted subsequently.
This commit is contained in:
@@ -19,6 +19,8 @@ module VagrantPlugins
|
||||
|
||||
@logger.debug("Recursively removing: #{machine_folder}")
|
||||
FileUtils.rm_rf(machine_folder, :secure => true)
|
||||
# need to recreate to prevent exception during a cancelled up
|
||||
FileUtils.mkdir_p(machine_folder)
|
||||
|
||||
@app.call(env)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user