Browse Source

Edge cases

pull/1785/head
jlukic 10 years ago
parent
commit
7851d3ae42
2 changed files with 10 additions and 4 deletions
  1. 4
      tasks/config/project/install.js
  2. 10
      tasks/install.js

4
tasks/config/project/install.js

@ -21,7 +21,7 @@ var when = {
// path // path
changeRoot: function(questions) { changeRoot: function(questions) {
return (questions.useRoot === undefined || questions.useRoot === false);
return (questions.useRoot !== undefined && questions.useRoot === false);
}, },
// permissions // permissions
@ -290,7 +290,7 @@ module.exports = {
type : 'input', type : 'input',
name : 'customRoot', name : 'customRoot',
message : 'Please enter the absolute path to your project root', message : 'Please enter the absolute path to your project root',
default : './',
default : '',
when : when.changeRoot when : when.changeRoot
}, },
{ {

10
tasks/install.js

@ -137,7 +137,7 @@ module.exports = function () {
return; return;
} }
else { else {
console.log('Current version of Semantic UI already installed, skipping set-up');
console.log('Current version of Semantic UI already installed');
return; return;
} }
@ -216,7 +216,13 @@ module.exports = function () {
// Set root to custom root path if set // Set root to custom root path if set
if(answers.customRoot) { 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 // special install paths only for PM install

Loading…
Cancel
Save