Browse Source

Consolidate when logic

pull/1785/head
jlukic 10 years ago
parent
commit
6b27f376e1
1 changed files with 5 additions and 4 deletions
  1. 9
      tasks/config/project/install.js

9
tasks/config/project/install.js

@ -21,12 +21,12 @@ var when = {
// path // path
changeRoot: function(questions) { changeRoot: function(questions) {
return (questions.useRoot === undefined || questions.useRoot == 'no');
return (questions.useRoot === undefined || questions.useRoot === false);
}, },
// permissions // permissions
changePermissions: function(questions) { changePermissions: function(questions) {
return (questions.changePermisions === true);
return (questions.changePermissions && questions.changePermissions === true);
}, },
// install // install
@ -278,11 +278,11 @@ module.exports = {
choices: [ choices: [
{ {
name : 'Yes', name : 'Yes',
value : 'yes'
value : true
}, },
{ {
name : 'No, let me specify', name : 'No, let me specify',
value : 'no'
value : false
} }
] ]
}, },
@ -399,6 +399,7 @@ module.exports = {
{ {
type: 'list', type: 'list',
name: 'changePermisions', name: 'changePermisions',
when: when.notAuto,
message: 'Should we set permissions on outputted files?', message: 'Should we set permissions on outputted files?',
choices: [ choices: [
{ {

Loading…
Cancel
Save