Skip to content
This repository was archived by the owner on Jun 2, 2023. It is now read-only.

Commit 6131d7f

Browse files
committed
fix validation panic
1 parent 19c0dcd commit 6131d7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/goenvbuild/preparer.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,15 @@ func parseVersion(v string) (*version, error) {
282282
}
283283

284284
func (p Preparer) runGolangciLint(ctx context.Context, sg *result.StepGroup, runner *command.StreamingRunner, cfg *goenvconfig.Service) error {
285+
cmd := "golangci-lint"
286+
285287
analyzedPaths, err := cfg.GetValidatedAnalyzedPaths()
286288
if err != nil {
289+
sg.AddStepCmd(cmd, "run")
287290
return errors.Wrap(err, "failed to build paths for analysis")
288291
}
289292

290293
args := append([]string{"run", "-v", "--deadline=5m"}, analyzedPaths...)
291-
cmd := "golangci-lint"
292294
sg.AddStepCmd(cmd, args...)
293295
_, err = runner.Run(ctx, cmd, args...)
294296
return err

0 commit comments

Comments
 (0)