sourcemint / sm-npm

25 stars 4 forks source link

Warn when `-d` is on without a directory #4

Closed gjtorikian closed 12 years ago

gjtorikian commented 12 years ago

I had mistakenly typed

sm clone -d --dev https://github.com/ajaxorg/cloud9infra/tree/master

The command destroyed a non-essential directory, before halting due to a permission issue. I realize one doesn't get a warning when doing, for example, rm -rf, but given the similarity between -d and --dev, this might be nice for fools like me. :)

cadorn commented 12 years ago

You are absolutely right. This is a hazard. I am removing the -d option so you have to use --delete for >= 0.1.77.

Thanks for reporting issues!