Skip to content

Commit

Permalink
Merge pull request #1447 from alrs/info-cmd-err
Browse files Browse the repository at this point in the history
client/command/info: fix dropped errors
  • Loading branch information
moloch-- authored Nov 3, 2023
2 parents 9d1fa0d + a13d63e commit daaf6e2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/command/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ func InfoCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string
// ID passed via argument takes priority
idArg := args[0]
session, beacon, err = use.SessionOrBeaconByID(idArg, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
} else if session != nil || beacon != nil {
currID := ""
if session != nil {
Expand All @@ -51,6 +55,10 @@ func InfoCmd(cmd *cobra.Command, con *console.SliverConsoleClient, args []string
currID = beacon.ID
}
session, beacon, err = use.SessionOrBeaconByID(currID, con)
if err != nil {
con.PrintErrorf("%s\n", err)
return
}
} else {
if session == nil && beacon == nil {
session, beacon, err = use.SelectSessionOrBeacon(con)
Expand Down

0 comments on commit daaf6e2

Please sign in to comment.