From d965ba6db9df8070cdd4b2014de58ab8d8cae621 Mon Sep 17 00:00:00 2001 From: emizzle Date: Tue, 18 Sep 2018 16:28:23 +1000 Subject: [PATCH] Geth creates new account - add password warning When `isDev` is false, and `mineWhenNeeded` is true, embark attempts to create a new account using `geth account new`, and uses the password file specified in `blockchain/config > accounts > password`. This warning informs the user that the create account command may fail if the password is missing. --- lib/modules/blockchain_process/geth_commands.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/modules/blockchain_process/geth_commands.js b/lib/modules/blockchain_process/geth_commands.js index 58001b5c7..61212b80f 100644 --- a/lib/modules/blockchain_process/geth_commands.js +++ b/lib/modules/blockchain_process/geth_commands.js @@ -63,6 +63,9 @@ class GethCommands { } newAccountCommand() { + if (!(this.config.account && this.config.account.password)){ + console.warn(__('Your blockchain is missing a password and creating an account may fail. Please consider updating ').yellow + __('config/blockchain > account > password').cyan + __(' then re-run the command').yellow); + } return this.geth_bin + " " + this.commonOptions().join(' ') + " account new "; }