mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Update c/image and c/common to latest, c/buildah to main
... to include https://github.com/containers/image/pull/2173, https://github.com/containers/common/pull/1731 and https://github.com/containers/buildah/pull/5143 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
8
vendor/github.com/openshift/imagebuilder/dockerfile/parser/parser.go
generated
vendored
8
vendor/github.com/openshift/imagebuilder/dockerfile/parser/parser.go
generated
vendored
@ -261,6 +261,10 @@ func Parse(rwc io.Reader) (*Result, error) {
|
||||
currentLine := 0
|
||||
root := &Node{StartLine: -1}
|
||||
scanner := bufio.NewScanner(rwc)
|
||||
buf := []byte{}
|
||||
// containerfile may contain large lines,
|
||||
// allocate 2MB for such use-cases.
|
||||
scanner.Buffer(buf, 2048*1024)
|
||||
warnings := []string{}
|
||||
|
||||
var err error
|
||||
@ -312,6 +316,10 @@ func Parse(rwc io.Reader) (*Result, error) {
|
||||
root.AddChild(child, startLine, currentLine)
|
||||
}
|
||||
|
||||
if scannerErr := scanner.Err(); scannerErr != nil {
|
||||
return nil, scannerErr
|
||||
}
|
||||
|
||||
if len(warnings) > 0 {
|
||||
warnings = append(warnings, "[WARNING]: Empty continuation lines will become errors in a future release.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user