Skip to content

Commit

Permalink
Check for errors after scanner.Scan() (#140)
Browse files Browse the repository at this point in the history
The scanner has a fixed buffer size of 1MB. If this is exceeded
scanning will fail silently, leading to misleading diff output.
  • Loading branch information
lachlancooper authored and mumoshu committed May 13, 2019
1 parent 065f9eb commit 4c805f9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifest/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func Parse(manifest string, defaultNamespace string) map[string]*MappingResult {
}
}
}
if err := scanner.Err(); err != nil {
log.Fatalf("Error reading input: %s", err)
}
return result
}

Expand Down

0 comments on commit 4c805f9

Please sign in to comment.