Skip to content

Commit

Permalink
fix: output a warning when minisign fails
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Sep 22, 2024
1 parent 080b42d commit 0f97c7d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/minisign/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import (
"errors"
"fmt"
"math/rand"
"strings"
"time"

"github.com/aquaproj/aqua/v2/pkg/config"
"github.com/aquaproj/aqua/v2/pkg/cosign"
"github.com/aquaproj/aqua/v2/pkg/runtime"
"github.com/aquaproj/aqua/v2/pkg/timer"
"github.com/sirupsen/logrus"
"github.com/suzuki-shunsuke/logrus-error/logerr"
)

type CommandExecutor interface {
Expand Down Expand Up @@ -77,6 +79,11 @@ func (e *ExecutorImpl) Verify(ctx context.Context, logE *logrus.Entry, param *Pa
for i := range 5 {
if err := e.exec(ctx, args); err == nil {
return nil
} else {

Check failure on line 82 in pkg/minisign/exec.go

View workflow job for this annotation

GitHub Actions / test / test

indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (revive)
logerr.WithError(logE, err).WithFields(logrus.Fields{
"exe": e.minisignExePath,
"args": strings.Join(args, " "),
}).Warn("execute minisign")
}
if i == 4 { //nolint:mnd
break
Expand Down

0 comments on commit 0f97c7d

Please sign in to comment.