Skip to content

Commit 11d6af8

Browse files
committed
Fix duplicated 'unknown cmd' output
1 parent 54dc6dc commit 11d6af8

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

client/command/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ func ServerCommands(con *client.SliverClient, serverCmds func() []*cobra.Command
7070
HiddenDefaultCmd: true,
7171
},
7272
}
73+
if !con.IsCLI {
74+
server.SilenceErrors = true
75+
server.SilenceUsage = true
76+
}
7377

7478
// Utility function to be used for binding new commands to
7579
// the sliver menu: call the function with the name of the

client/command/sliver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ func SliverCommands(con *client.SliverClient) console.Commands {
6565
HiddenDefaultCmd: true,
6666
},
6767
}
68+
if !con.IsCLI {
69+
sliver.SilenceErrors = true
70+
sliver.SilenceUsage = true
71+
}
6872

6973
// Utility function to be used for binding new commands to
7074
// the sliver menu: call the function with the name of the

0 commit comments

Comments
 (0)