mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
vendor: update c/{buildah,common,image,storage} to main
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
10
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/errors.go
generated
vendored
10
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/errors.go
generated
vendored
@@ -5,14 +5,14 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// ErrorLocation gives a location in source code that caused the error
|
||||
type ErrorLocation struct {
|
||||
// LocationError gives a location in source code that caused the error
|
||||
type LocationError struct {
|
||||
Locations [][]Range
|
||||
error
|
||||
}
|
||||
|
||||
// Unwrap unwraps to the next error
|
||||
func (e *ErrorLocation) Unwrap() error {
|
||||
func (e *LocationError) Unwrap() error {
|
||||
return e.error
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ func setLocation(err error, location []Range, add bool) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
var el *ErrorLocation
|
||||
var el *LocationError
|
||||
if errors.As(err, &el) {
|
||||
if add {
|
||||
el.Locations = append(el.Locations, location)
|
||||
@@ -54,7 +54,7 @@ func setLocation(err error, location []Range, add bool) error {
|
||||
}
|
||||
return err
|
||||
}
|
||||
return stack.Enable(&ErrorLocation{
|
||||
return stack.Enable(&LocationError{
|
||||
error: err,
|
||||
Locations: [][]Range{location},
|
||||
})
|
||||
|
||||
4
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/line_parsers.go
generated
vendored
4
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/line_parsers.go
generated
vendored
@@ -318,7 +318,7 @@ func parseMaybeJSON(rest string, d *directives) (*Node, map[string]bool, error)
|
||||
if err == nil {
|
||||
return node, attrs, nil
|
||||
}
|
||||
if err == errDockerfileNotStringArray {
|
||||
if errors.Is(err, errDockerfileNotStringArray) {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ func parseMaybeJSONToList(rest string, d *directives) (*Node, map[string]bool, e
|
||||
if err == nil {
|
||||
return node, attrs, nil
|
||||
}
|
||||
if err == errDockerfileNotStringArray {
|
||||
if errors.Is(err, errDockerfileNotStringArray) {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
|
||||
6
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go
generated
vendored
6
vendor/github.com/moby/buildkit/frontend/dockerfile/parser/parser.go
generated
vendored
@@ -114,7 +114,7 @@ type Heredoc struct {
|
||||
var (
|
||||
dispatch map[string]func(string, *directives) (*Node, map[string]bool, error)
|
||||
reWhitespace = regexp.MustCompile(`[\t\v\f\r ]+`)
|
||||
reHeredoc = regexp.MustCompile(`^(\d*)<<(-?)([^<]*)$`)
|
||||
reHeredoc = regexp.MustCompile(`^(\d*)<<(-?)\s*([^<]*)$`)
|
||||
reLeadingTabs = regexp.MustCompile(`(?m)^\t+`)
|
||||
)
|
||||
|
||||
@@ -556,8 +556,8 @@ func scanLines(data []byte, atEOF bool) (advance int, token []byte, err error) {
|
||||
}
|
||||
|
||||
func handleScannerError(err error) error {
|
||||
switch err {
|
||||
case bufio.ErrTooLong:
|
||||
switch {
|
||||
case errors.Is(err, bufio.ErrTooLong):
|
||||
return errors.Errorf("dockerfile line greater than max allowed size of %d", bufio.MaxScanTokenSize-1)
|
||||
default:
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user