Skip to content

Commit

Permalink
cmd: send version info to stdout (#1660)
Browse files Browse the repository at this point in the history
  • Loading branch information
acud authored May 5, 2021
1 parent 6af9cbd commit 4c74b59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cmd/bee/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import (
)

func (c *command) initVersionCmd() {
c.root.AddCommand(&cobra.Command{
v := &cobra.Command{
Use: "version",
Short: "Print version number",
Run: func(cmd *cobra.Command, args []string) {
cmd.Println(bee.Version)
},
})
}
v.SetOut(c.root.OutOrStdout())
c.root.AddCommand(v)
}
4 changes: 2 additions & 2 deletions pkg/p2p/libp2p/connections_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ func TestBlocklisting(t *testing.T) {
t.Fatal("expected error during connection, got nil")
}

expectPeers(t, s1)
expectPeersEventually(t, s2)
expectPeersEventually(t, s1)
expectPeers(t, s2)
}

func TestTopologyNotifier(t *testing.T) {
Expand Down

0 comments on commit 4c74b59

Please sign in to comment.