Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Secure folder wiping #220
In #219, someone came to us with an issue: his project folder has been wiped out by SassDoc after running the regular command. This is no surprise.
Needless to say running a command that compiles things on your root folder is definitely a bad idea, especially if you're not familiar with the tool you're using.
That being said, I think we could add some safeguards to avoid such a situation to happen again. At this point, we can think of a couple of different things.
Also add a
We could test whether the destination folder is parent of the source folder, in case we abort immediately. For instance:
sassdoc a/b/c a/b
Creating a folder
Instead of wiping the destination folder, we could create a
Move to trash instead of deleting
One solution would be to use trash rather than
What do you think? My opinion: either implement the first two simultaneously, or the fourth.
referenced this issue
Sep 25, 2014
I'll be in favor of implementing the first and second solution.
So basically run 2 test:
We then definitely need a new option
Let's do this.
Depending on the answer:
Then abort. No prompt. So basically a throw.