From be8a11b58f212ba1a764bee681b7baf0fb88955d Mon Sep 17 00:00:00 2001 From: jash Date: Sun, 21 Oct 2018 00:16:51 +0200 Subject: [PATCH] moved common code to the end of method --- install/generator-cyphernode/generators/app/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/install/generator-cyphernode/generators/app/index.js b/install/generator-cyphernode/generators/app/index.js index 6c4737b..b9c353e 100644 --- a/install/generator-cyphernode/generators/app/index.js +++ b/install/generator-cyphernode/generators/app/index.js @@ -118,12 +118,6 @@ module.exports = class extends Generator { process.exit(1); } - this._assignConfigDefaults(this.props); - - for( let c of this.featureChoices ) { - c.checked = this._isChecked( 'features', c.value ); - } - } else { let r = {}; process.stdout.write(reset); @@ -149,10 +143,12 @@ module.exports = class extends Generator { this.configurationPassword = r.password0; this.props = {}; - this._assignConfigDefaults(this.props); - console.log(chalk.bold.green('Password is set')); + } + this._assignConfigDefaults(this.props); + for( let c of this.featureChoices ) { + c.checked = this._isChecked( 'features', c.value ); } }