Skip to content

Commit 2dadf65

Browse files
feature: 新增go mod tidy失败报错
1 parent eb29d0a commit 2dadf65

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

module/go_mod/goModTidy.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"context"
66
"errors"
77
"github.com/murphysecurity/murphysec/infra/logctx"
8+
"github.com/murphysecurity/murphysec/scanerr"
89
"go.uber.org/zap"
910
"os"
1011
"os/exec"
@@ -55,6 +56,10 @@ again:
5556
cmd.Wait()
5657

5758
if againBol {
59+
scanerr.Add(ctx, scanerr.Param{
60+
Kind: "auto_build_error",
61+
Content: stdErr.String(),
62+
})
5863
return errors.New(stdErr.String())
5964
}
6065
if stdErr.Len() > 0 {

0 commit comments

Comments
 (0)