mirror of
https://github.com/containers/podman.git
synced 2025-09-19 12:56:57 +08:00
Bump github.com/containers/buildah from 1.16.4 to 1.16.5
Bumps [github.com/containers/buildah](https://github.com/containers/buildah) from 1.16.4 to 1.16.5. - [Release notes](https://github.com/containers/buildah/releases) - [Changelog](https://github.com/containers/buildah/blob/master/CHANGELOG.md) - [Commits](https://github.com/containers/buildah/compare/v1.16.4...v1.16.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
![27856297+dependabot-preview[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Daniel J Walsh

parent
2adc1b284d
commit
22b1d10d31
21
vendor/github.com/openshift/imagebuilder/shell_parser.go
generated
vendored
21
vendor/github.com/openshift/imagebuilder/shell_parser.go
generated
vendored
@ -7,6 +7,7 @@ package imagebuilder
|
||||
// be added by adding code to the "special ${} format processing" section
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strings"
|
||||
"text/scanner"
|
||||
@ -119,7 +120,7 @@ func (sw *shellWord) processStopOn(stopChar rune) (string, []string, error) {
|
||||
|
||||
if stopChar != scanner.EOF && ch == stopChar {
|
||||
sw.scanner.Next()
|
||||
break
|
||||
return result, words.getWords(), nil
|
||||
}
|
||||
if fn, ok := charFuncMapping[ch]; ok {
|
||||
// Call special processing func for certain chars
|
||||
@ -156,6 +157,10 @@ func (sw *shellWord) processStopOn(stopChar rune) (string, []string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if stopChar != scanner.EOF {
|
||||
return "", []string{}, fmt.Errorf("unexpected end of statement while looking for matching %s", string(stopChar))
|
||||
}
|
||||
|
||||
return result, words.getWords(), nil
|
||||
}
|
||||
|
||||
@ -168,9 +173,12 @@ func (sw *shellWord) processSingleQuote() (string, error) {
|
||||
|
||||
for {
|
||||
ch := sw.scanner.Next()
|
||||
if ch == '\'' || ch == scanner.EOF {
|
||||
if ch == '\'' {
|
||||
break
|
||||
}
|
||||
if ch == scanner.EOF {
|
||||
return "", errors.New("unexpected end of statement while looking for matching single-quote")
|
||||
}
|
||||
result += string(ch)
|
||||
}
|
||||
|
||||
@ -184,12 +192,15 @@ func (sw *shellWord) processDoubleQuote() (string, error) {
|
||||
|
||||
sw.scanner.Next()
|
||||
|
||||
for sw.scanner.Peek() != scanner.EOF {
|
||||
for {
|
||||
ch := sw.scanner.Peek()
|
||||
if ch == '"' {
|
||||
sw.scanner.Next()
|
||||
break
|
||||
}
|
||||
if ch == scanner.EOF {
|
||||
return "", errors.New("unexpected end of statement while looking for matching double-quote")
|
||||
}
|
||||
if ch == '$' {
|
||||
tmp, err := sw.processDollar()
|
||||
if err != nil {
|
||||
@ -206,8 +217,8 @@ func (sw *shellWord) processDoubleQuote() (string, error) {
|
||||
continue
|
||||
}
|
||||
|
||||
if chNext == '"' || chNext == '$' {
|
||||
// \" and \$ can be escaped, all other \'s are left as-is
|
||||
if chNext == '"' || chNext == '$' || chNext == '\\' {
|
||||
// \" and \$ and \\ can be escaped, all other \'s are left as-is
|
||||
ch = sw.scanner.Next()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user