Skip to content

Commit

Permalink
fix npe when -q and -dump are passed to check
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanejohnson committed Jul 1, 2023
1 parent 7f7ac0c commit 17a7c67
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cmd/checkintermediatecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ func (ci *CheckIntermediateCmd) run() error {
}
}
save := true
var w io.Writer
var w io.Writer = os.Stdout
if ci.quiet || ci.iFile == "" {
save = false
} else {
switch ci.iFile {
case "-":
w = os.Stdout
defer os.Stdout.Sync()
default:
f, err := os.OpenFile(ci.iFile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
Expand Down

0 comments on commit 17a7c67

Please sign in to comment.