From 0f6ea45f33c6261265f30711e966c0d3cbd62cb1 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 4 Jul 2018 16:40:46 +0300 Subject: [PATCH] check for cmd not found in stderr --- lib/cmds/blockchain/blockchain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cmds/blockchain/blockchain.js b/lib/cmds/blockchain/blockchain.js index 876357d6..a9aa2bb8 100644 --- a/lib/cmds/blockchain/blockchain.js +++ b/lib/cmds/blockchain/blockchain.js @@ -221,8 +221,8 @@ Blockchain.prototype.checkPathLength = function() { Blockchain.prototype.isClientInstalled = function(callback) { let versionCmd = this.client.determineVersionCommand(); - this.runCommand(versionCmd, {}, (err, stdout, _stderr) => { - if (err || !stdout || stdout.indexOf("not found") >= 0) { + this.runCommand(versionCmd, {}, (err, stdout, stderr) => { + if (err || !stdout || stderr.indexOf("not found") >= 0 || stdout.indexOf("not found") >= 0) { return callback('Geth not found'); } callback();