Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vagrant: Rebuild rm -rf not working as expected #93

Open
toddheslin opened this issue Feb 22, 2017 · 3 comments
Open

Vagrant: Rebuild rm -rf not working as expected #93

toddheslin opened this issue Feb 22, 2017 · 3 comments
Labels

Comments

@toddheslin
Copy link

This could be in relation to the new https://github.com/xyu/heroku-wp/tree/fix/use-bento-box branch.

It seems that on the rebuild process there are certain directories that can't be removed, presumably because of hidden files. However the problem is that the fresh files from the working directory don't get copied to the vagrant box because of this error.

Reproducing error

$ vagrant ssh
$ cd /app
$ rm -rf tmp

And the error shows:

rm: cannot remove 'tmp/public.old/wp-admin': Directory not empty
rm: cannot remove 'tmp/public.old/wp-content': Directory not empty
rm: cannot remove 'tmp/public.old/wp-includes': Directory not empty

My understanding is that we should be able to delete these directories on the target machine so that it's a fresh build. If app_slug_compile.sh is trying to do the same then we would have problems in running resync right?

@toddheslin
Copy link
Author

To explain the impact of this issue. Once a change is made in my /public/wp-content/themes the process rebuilds back on Vagrant, but the page won't load after it is complete. Here is the nginx error log:
screenshot 2017-02-23 00 03 44

When checking the public.built folder within the vagrant box I find:

  • wp-content/themes empty
  • wp-includes empty
  • wp-admin empty

Hope this helps debug what is going on.

The only solution I have found is vagrant destroy and vagrant up. A long way round for a theme change!

@duncanjbrown
Copy link

duncanjbrown commented Feb 22, 2017

@toddheslin I found a workaround (but not a fix): #90 (comment).

(I am on the default nginx-php branch, not use-bento-box)

@xyu xyu added the bug label Feb 23, 2017
@ryanburnette
Copy link
Contributor

Running rm -rf tmp/public... works fine from the host, but not the guest for me. It's something with Vagrant syncing the /app directory between the host and guest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants