officert / mongotron

Cross platform Mongo DB management
http://mongotron.io
MIT License
2.69k stars 214 forks source link

Gulp task:clear "rm -rf" on Windows #146

Open necrower opened 8 years ago

necrower commented 8 years ago

In line 76 in gulpfile.js the rm command does not work on windows.

childProcess.exec(rm -rf ${appConfig.releasePath} && rm -rf ${appConfig.buildPath}, next);

PStoner3 commented 8 years ago

I may have a solution for this. I added some validation to the gulp file to 1) check the os environment using process.platform. Then I check if the directories exist. if both, or either, exist and the platform is win32 then I use the rmdir command to remove. otherwise I leave the original command intact.

officer, I would like for you to review. please provide next steps as this is my first foray into attempting to assist

Thank you

jhernandezb commented 8 years ago

Maybe using rimraf instead?

PStoner3 commented 8 years ago

PR #152