Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Fix(state): state reset --plugins|--platforms was resetting both
Browse files Browse the repository at this point in the history
  • Loading branch information
jakub-g committed Feb 17, 2016
1 parent 0d24e15 commit 0e72263
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,14 @@ State.checkAndSaveConfigXml = function checkAndSaveConfigXml(appDirectory, plugi
State.resetState = function resetState(appDirectory, options) {
var platformPath = path.join(appDirectory, 'platforms');
var pluginPath = path.join(appDirectory, 'plugins');
shelljs.rm('-rf', [platformPath, pluginPath]);
logging.logger.info('Removed platforms and plugins'.blue.bold);
if (options.platforms) {
shelljs.rm('-rf', [platformPath]);
logging.logger.info('Removed platforms'.blue.bold);
}
if (options.plugins) {
shelljs.rm('-rf', [pluginPath]);
logging.logger.info('Removed plugins'.blue.bold);
}
State.restoreState(appDirectory, options)
.then(function() {
logging.logger.info('Ionic reset state complete'.green.bold);
Expand Down

0 comments on commit 0e72263

Please sign in to comment.