Skip to content

Commit

Permalink
Ensure snapshot-db exit code marks failure when appropriate. Fixes #2406
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Sep 18, 2024
1 parent 44e84d0 commit 39b2ca3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ziti/cmd/agentcli/agent_snapshot_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package agentcli

import (
"errors"
"fmt"
"github.com/openziti/channel/v3"
"github.com/openziti/ziti/common/pb/mgmt_pb"
Expand Down Expand Up @@ -65,7 +66,7 @@ func (self *AgentSnapshoptDbAction) makeRequest(ch channel.Channel) error {
if result.Success {
fmt.Println(result.Message)
} else {
fmt.Printf("error: %v\n", result.Message)
return errors.New(result.Message)
}
return nil
}

0 comments on commit 39b2ca3

Please sign in to comment.