From 94453c85c78908096764f8c0cb4cf72a470c182b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2020 09:16:41 +0000 Subject: build(deps): bump github.com/containers/storage from 1.15.7 to 1.15.8 Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.7 to 1.15.8. - [Release notes](https://github.com/containers/storage/releases) - [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md) - [Commits](https://github.com/containers/storage/compare/v1.15.7...v1.15.8) Signed-off-by: dependabot-preview[bot] Signed-off-by: Valentin Rothberg --- vendor/github.com/mattn/go-shellwords/go.mod | 2 ++ .../github.com/mattn/go-shellwords/shellwords.go | 28 +++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'vendor/github.com/mattn') diff --git a/vendor/github.com/mattn/go-shellwords/go.mod b/vendor/github.com/mattn/go-shellwords/go.mod index 8d96dbd5f..927c8c7d6 100644 --- a/vendor/github.com/mattn/go-shellwords/go.mod +++ b/vendor/github.com/mattn/go-shellwords/go.mod @@ -1 +1,3 @@ module github.com/mattn/go-shellwords + +go 1.13 diff --git a/vendor/github.com/mattn/go-shellwords/shellwords.go b/vendor/github.com/mattn/go-shellwords/shellwords.go index ff5e73091..ef080861a 100644 --- a/vendor/github.com/mattn/go-shellwords/shellwords.go +++ b/vendor/github.com/mattn/go-shellwords/shellwords.go @@ -88,9 +88,17 @@ loop: backtick += string(r) } else if got { if p.ParseEnv { - buf = replaceEnv(p.Getenv, buf) + parser := &Parser{ParseEnv: false, ParseBacktick: false, Position: 0, Dir: p.Dir} + strs, err := parser.Parse(replaceEnv(p.Getenv, buf)) + if err != nil { + return nil, err + } + for _, str := range strs { + args = append(args, str) + } + } else { + args = append(args, buf) } - args = append(args, buf) buf = "" got = false } @@ -144,7 +152,7 @@ loop: } case '"': if !singleQuoted && !dollarQuote { - if doubleQuoted && buf == "" { + if doubleQuoted { got = true } doubleQuoted = !doubleQuoted @@ -152,7 +160,7 @@ loop: } case '\'': if !doubleQuoted && !dollarQuote { - if singleQuoted && buf == "" { + if singleQuoted { got = true } singleQuoted = !singleQuoted @@ -180,9 +188,17 @@ loop: if got { if p.ParseEnv { - buf = replaceEnv(p.Getenv, buf) + parser := &Parser{ParseEnv: false, ParseBacktick: false, Position: 0, Dir: p.Dir} + strs, err := parser.Parse(replaceEnv(p.Getenv, buf)) + if err != nil { + return nil, err + } + for _, str := range strs { + args = append(args, str) + } + } else { + args = append(args, buf) } - args = append(args, buf) } if escaped || singleQuoted || doubleQuoted || backQuote || dollarQuote { -- cgit v1.2.3-54-g00ecf