diff --git a/tasks/config/project/install.js b/tasks/config/project/install.js index 043ddf684..abf6ad761 100644 --- a/tasks/config/project/install.js +++ b/tasks/config/project/install.js @@ -21,7 +21,7 @@ var when = { // path changeRoot: function(questions) { - return (questions.useRoot === undefined || questions.useRoot === false); + return (questions.useRoot !== undefined && questions.useRoot === false); }, // permissions @@ -290,7 +290,7 @@ module.exports = { type : 'input', name : 'customRoot', message : 'Please enter the absolute path to your project root', - default : './', + default : '', when : when.changeRoot }, { diff --git a/tasks/install.js b/tasks/install.js index 5c014948c..94bf597ff 100644 --- a/tasks/install.js +++ b/tasks/install.js @@ -137,7 +137,7 @@ module.exports = function () { return; } else { - console.log('Current version of Semantic UI already installed, skipping set-up'); + console.log('Current version of Semantic UI already installed'); return; } @@ -216,7 +216,13 @@ module.exports = function () { // Set root to custom root path if set if(answers.customRoot) { - manager.root = answers.customRoot; + if(answers.customRoot === '') { + console.log('Unable to proceed, invalid project root'); + return; + } + else { + manager.root = answers.customRoot; + } } // special install paths only for PM install