mirror of
https://github.com/ddworken/hishtory.git
synced 2025-04-17 14:08:32 +02:00
Update hishtory redact so that it doesn't error out due to it redacting the presaved entry for the current command
This commit is contained in:
parent
fdbe91246e
commit
c613e696b4
@ -65,7 +65,7 @@ func redact(ctx context.Context, query string, force bool) error {
|
||||
if res.Error != nil {
|
||||
return res.Error
|
||||
}
|
||||
if res.RowsAffected != int64(len(historyEntries)) {
|
||||
if res.RowsAffected > int64(len(historyEntries))+1 || res.RowsAffected < int64(len(historyEntries))-1 {
|
||||
return fmt.Errorf("DB deleted %d rows, when we only expected to delete %d rows, something may have gone wrong", res.RowsAffected, len(historyEntries))
|
||||
}
|
||||
err = deleteOnRemoteInstances(ctx, historyEntries)
|
||||
|
Loading…
Reference in New Issue
Block a user