mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-20 13:54:46 +02:00
Replaced shlex with dockerfile/shell package
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user