diff --git a/src/cmd/peer/AddPeer.ts b/src/cmd/peer/AddPeer.ts index 2305b15..0bdb538 100644 --- a/src/cmd/peer/AddPeer.ts +++ b/src/cmd/peer/AddPeer.ts @@ -28,6 +28,7 @@ const addPeer = async (argv: any): Promise => { } else { console.error('Error: System config url is required') } + process.exit(1) } const printPeer = async (peer: IPeer): Promise => { diff --git a/src/cmd/peer/ListPeers.ts b/src/cmd/peer/ListPeers.ts index 4d3c91e..989707a 100644 --- a/src/cmd/peer/ListPeers.ts +++ b/src/cmd/peer/ListPeers.ts @@ -5,6 +5,7 @@ const listPeer = async (): Promise => { Peer.find({}, '-_id -certificate -fingerprint', (error, peers) => { printPeers(peers) }) + process.exit(1) } const printPeers = async (peers: IPeer[]): Promise => { diff --git a/src/cmd/peer/RemovePeer.ts b/src/cmd/peer/RemovePeer.ts index e3f4f5f..a7e74e2 100644 --- a/src/cmd/peer/RemovePeer.ts +++ b/src/cmd/peer/RemovePeer.ts @@ -12,6 +12,7 @@ const removePeer = async (argv: any): Promise => { } }) } + process.exit(1) } const RemovePeerCommand = { diff --git a/src/cmd/peer/ShowPeer.ts b/src/cmd/peer/ShowPeer.ts index 8b30d5a..ac9f9d2 100644 --- a/src/cmd/peer/ShowPeer.ts +++ b/src/cmd/peer/ShowPeer.ts @@ -11,6 +11,7 @@ const showPeer = async (argv: any): Promise => { console.error(`${chalk.red('Error:')} Peer not found: ${argv.node_id}`) } } + process.exit(1) } const printPeer = async (peer: IPeer): Promise => {