Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Update cli-test.js #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
Mowrish authored Dec 27, 2019
commit 08394881a98b35940c00e60118faf540dc5f9f49
14 changes: 6 additions & 8 deletions bin/cli-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) ) {
Expand Down