Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 8, 2024
1 parent 66b0dab commit 49e9a07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ checksum:
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
skip: true
disable: true
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ func main() {

f, err := os.OpenFile(gOutFile, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
if err != nil {
fmt.Fprintf(os.Stderr, fmt.Sprintf("unable to open github output: %s\n", err))
fmt.Fprintf(os.Stderr, "unable to open github output: %s\n", err)
os.Exit(127)
}
defer f.Close()

// inside a Github action, export vulns
if output, err := security.Format(vulns, "raw_json"); err == nil {
if _, err = f.WriteString("vulns=" + string(output) + "\n"); err != nil {
fmt.Fprintf(os.Stderr, fmt.Sprintf("unable to write into github output: %s\n", err))
fmt.Fprintf(os.Stderr, "unable to write into github output: %s\n", err)
os.Exit(127)
}
}
Expand Down

0 comments on commit 49e9a07

Please sign in to comment.