Closed jeff1evesque closed 7 years ago
My host machine is Windows 7 (not sure if that is useful).
Quoting the *.pyc
also requires vagrant destroy
to be run a second time:
# clean up files on the host after 'vagrant destroy'
config.trigger.after :destroy do
run 'find . -name "*.pyc" -type f -exec rm -r {} +'
end
Hello!
Please, could you post the output of the two vagrant destroy
commands with VAGRANT_LOG=debug
enabled?
Many thanks!
Hi @emyl, I will have this paste to you tomorrow (my apologies). Only have access to an OSX machine this long weekend.
Shoot, it says:
$ vagrant destroy VAGRANT_LOG=debug
The machine with the name 'VAGRANT_LOG=debug' was not found configured for
this Vagrant environment.
So, I ran it without the above flag (first time):
$ vagrant destroy
default: Are you sure you want to destroy the 'default' VM? [y/N] y
==> default: Destroying VM and associated drives...
==> default: Running triggers after destroy...
==> default: Executing command "rm -Rf log/database"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf log/application"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf log/webcompiler"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf log/webserver"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf build"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf interface/static/css"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf interface/static/img"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf interface/static/js"...
==> default: Command execution finished.
==> default: Executing command "rm -Rf puppet/environment/*/modules_contrib"...
==> default: Command execution finished.
==> default: Executing command "rm -f src/js/.gitignore"...
==> default: Command execution finished.
==> default: Executing command "rm -f src/js/support_vector.js"...
==> default: Command execution finished.
==> default: Executing command "find . -name *.pyc -type f -exec rm -r {} +"...
==> default: Command execution finished.
==> default: Executing command "find . -name __pycache__ -type d -exec rm -r {} +"...
==> default: Command execution finished.
==> default: Executing command "find . -name .cache -type d -exec rm -r {} +"...
==> default: Command execution finished.
Note: the screenshot above (towards the right), shows *.pyc
files that was supposed to be deleted, and an indication that the config.trigger.after :destroy do
didn't run.
However, if I run it a second time, everything works as expected:
Hi,
Please could you swap the command to:
VAGRANT_LOG=debug vagrant destroy
and post the output?
Hi @emyl, sorry for the late response. It seems my original error no longer exists. I recently had to reinstall vagrant, on another windows machine. I currently have vagrant 1.8.5
. So, either I had an older version of vagrant (pre 1.8.5
), or my same windows 7 on the other machine had some internal problems.
Thanks for the feedback, going to close the issue 😉
When I run
vagrant destroy
, myVagrantfile
should remove any files with a*.pyc
extension:However, it doesn't remove the python
*.pyc
files. Instead, if I runvagrant destroy
a second time, the files are properly removed, recursively.