Skip to content

Commit

Permalink
lsjson: fix unterminated JSON in the presence of errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ncw committed Feb 2, 2021
1 parent bae550c commit 1415666
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cmd/lsjson/lsjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,11 @@ can be processed line by line as each item is written one to a line.
}
return nil
})
if err != nil {
return err
}
if !first {
fmt.Println()
}
fmt.Println("]")
return nil
return err
})
},
}

0 comments on commit 1415666

Please sign in to comment.