Skip to content

Commit

Permalink
fix yarn peer [add|ls|remove] commands dont return shell #6 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortthefomo authored Sep 16, 2022
1 parent e690dd2 commit bdd8cfe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/peer/AddPeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const addPeer = async (argv: any): Promise<void> => {
} else {
console.error('Error: System config url is required')
}
process.exit(1)
}

const printPeer = async (peer: IPeer): Promise<void> => {
Expand Down
1 change: 1 addition & 0 deletions src/cmd/peer/ListPeers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const listPeer = async (): Promise<void> => {
Peer.find({}, '-_id -certificate -fingerprint', (error, peers) => {
printPeers(peers)
})
process.exit(1)
}

const printPeers = async (peers: IPeer[]): Promise<void> => {
Expand Down
1 change: 1 addition & 0 deletions src/cmd/peer/RemovePeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const removePeer = async (argv: any): Promise<void> => {
}
})
}
process.exit(1)
}

const RemovePeerCommand = {
Expand Down
1 change: 1 addition & 0 deletions src/cmd/peer/ShowPeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const showPeer = async (argv: any): Promise<void> => {
console.error(`${chalk.red('Error:')} Peer not found: ${argv.node_id}`)
}
}
process.exit(1)
}

const printPeer = async (peer: IPeer): Promise<void> => {
Expand Down

0 comments on commit bdd8cfe

Please sign in to comment.