Replaced shlex with dockerfile/shell package

This commit is contained in:
Priya Wadhwa
2018-03-16 12:20:50 -07:00
parent e84ebcc494
commit f33e507018
4 changed files with 31 additions and 6 deletions
+3
View File
@@ -23,12 +23,15 @@ import (
"github.com/docker/docker/builder/dockerfile/parser"
)
var EscapeToken rune
// Parse parses the contents of a Dockerfile and returns a list of commands
func Parse(b []byte) ([]instructions.Stage, error) {
p, err := parser.Parse(bytes.NewReader(b))
if err != nil {
return nil, err
}
EscapeToken = p.EscapeToken
stages, _, err := instructions.Parse(p.AST)
if err != nil {
return nil, err