Closed iashwash closed 7 years ago
What do you specify as a cleanup command? If it's just sudo rm -rf
I wonder if it'd make sense to add sudo
to the clean command as default.
Seems like anyone else running local mode (or using cookbooks which create any files in the solo tree) would run into this problem as well.
Yup, exactly - I was specifying sudo rm -rf
I think making sudo the default makes sense to me - I was just trying to make it as non-intrusive as possible. I'll submit a PR with that, and leave it up to you to close the one you don't like.
Opened #519 - if you prefer a different direction on either PR, just let me know.
https://github.com/matschaffer/knife-solo/pull/519 looks perfect. Thanks!
rm -rf
for clean_upUse Case
If you run chef in
local_mode
, we end up finding our localchef-solo
directory has its local cache populated with files owned by root. So theknife solo clean
fails silently on permission denied removing those files. This allows you to override therm -rf
with your own command, in our casesudo rm -rf
Some examples from running
knife solo clean
with-VV