Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
return early
  • Loading branch information
andrewmbenton committed Oct 19, 2023
commit 25761838a6fd8c79380e17b9d037ef94101f62c1
3 changes: 1 addition & 2 deletions internal/compiler/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func (c *Compiler) parseQueries(o opts.Parser) (*Result, error) {
if err != nil {
return nil, err
}
fileLoop:
for _, filename := range files {
blob, err := os.ReadFile(filename)
if err != nil {
Expand All @@ -92,7 +91,7 @@ fileLoop:
merr.Add(filename, src, loc, err)
// If this rpc unauthenticated error bubbles up, then all future parsing/analysis will fail
if errors.Is(err, rpc.ErrUnauthenticated) {
break fileLoop
return nil, merr
}
Comment on lines +94 to +95
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just return early here return nil, merr

continue
}
Expand Down