Skip to content

Commit

Permalink
fix: 改一下错误输出
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki-working committed Jan 26, 2024
1 parent 6f45d3f commit 9fe9996
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmd/murphy/internal/cv/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ func DisplaySubmitSBOMErr(ctx context.Context, e error) {
ui.Use(ctx).Display(ui.MsgError, "上传SBOM信息失败:"+e.Error())
}

func DisplayStartCheckErr(ctx context.Context, e error) {
ui.Use(ctx).Display(ui.MsgError, "开始检测失败:"+e.Error())
}

func DisplayStatusClear(ctx context.Context) {
ui.Use(ctx).ClearStatus()
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/murphy/internal/scan/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func scan(ctx context.Context, dir string, accessType model.AccessType, mode mod
// start check
e = api.StartCheck(api.DefaultClient(), task)
if e != nil {
cv.DisplaySubmitSBOMErr(ctx, e)
cv.DisplayStartCheckErr(ctx, e)
return nil, e
}

Expand Down

0 comments on commit 9fe9996

Please sign in to comment.