Skip to content

Commit

Permalink
Merge pull request #2417 from openziti/fix-snapshot-db-return
Browse files Browse the repository at this point in the history
Ensure snapshot-db exit code marks failure when appropriate. Fixes #2406
  • Loading branch information
plorenz authored Sep 19, 2024
2 parents 44e84d0 + 39b2ca3 commit f48d990
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 f48d990

Please sign in to comment.