From 08394881a98b35940c00e60118faf540dc5f9f49 Mon Sep 17 00:00:00 2001 From: Mowrish Dev Date: Fri, 27 Dec 2019 16:52:17 +0530 Subject: [PATCH] Update cli-test.js This change is for the 'is-client' command to pick serverport from 'config.js' file located in 'lib' folder if arguments for -s option is not specified while the command is executed. --- bin/cli-test.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/bin/cli-test.js b/bin/cli-test.js index aaa6fa1..b942199 100755 --- a/bin/cli-test.js +++ b/bin/cli-test.js @@ -358,14 +358,12 @@ function initMe() { infoLog(`Using trust store: ${trustStorePath}`); } - if ( util.isNullOrUndefined(program.serverport)) { - program.serverport = 'localhost:5555'; - } - - let ar = program.serverport.split(':'); - if ( ar.length == 2 ) { - config.http.hostname = ar[0]; - config.http.port = ar[1]; + if ( !util.isNullOrUndefined(program.serverport)) { + let ar = program.serverport.split(':'); + if ( ar.length == 2 ) { + config.http.hostname = ar[0]; + config.http.port = ar[1]; + } } if ( !util.isNullOrUndefined(program.user) ) {