gruntjs/grunt-contrib-clean

It is possible to clean the Gruntfile

ariporad opened this issue · 3 comments

Hello!

Last night, I found out the hard way that it is 100% possible to clean the gruntfile. It seems like this behavior is a bug, and could be fixed by simply ignoring "Gruntfile.js" as an argument.

Thanks!

Was you using a filter like this : *.* ?

I don't see, why this should be a bug?

You told the system to delete everything and, to be fair, the gruntfile is part of this. So the system just does what you've orded it to do.

To be honest, I've expected this behaviour, and I think this behaviour is the expected one.

shama commented

We take minimal precautions when it comes to deleting your entire file system (force is required outside of the cwd). But if your pattern matches your own Gruntfile, it will delete it as expected.