Skip to content

Commit

Permalink
fix: --json
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Jun 22, 2022
1 parent 821a7d4 commit fa8c0f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ func scanCmd() *cobra.Command {
ctx = model.WithScanTask(ctx, task)

if e := inspector.Scan(ctx); e != nil {
if tt == model.TaskTypeJenkins {
fmt.Println(model.GenerateIdeaErrorOutput(e))
}
SetGlobalExitCode(-1)
} else {
if tt == model.TaskTypeJenkins {
fmt.Println(model.GenerateIdeaOutput(ctx))
}
}
},
Short: "Scan the source code of the specified project, currently supporting java, javascript, go, and python",
Expand Down

0 comments on commit fa8c0f2

Please sign in to comment.