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:
dependabot-preview[bot]
2020-10-23 08:18:13 +00:00
committed by Daniel J Walsh
parent 2adc1b284d
commit 22b1d10d31
19 changed files with 152 additions and 107 deletions

View File

@ -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()
}
}