Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
parsed instructions are uppercase now
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwagner committed Jul 20, 2021
1 parent 0337ad2 commit 7cfb735
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/applyupdate.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (u *Updater) ApplyUpdate(ctx context.Context, update updater.Update) error
var oldnew []string
var seenFrom bool
for _, instruction := range parsed.AST.Children {
switch instruction.Value {
switch strings.ToLower(instruction.Value) {
case command.From:
seenFrom = true
dep := parseDependency(vars, instruction.Next.Value)
Expand Down
2 changes: 1 addition & 1 deletion docker/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func extractImages(parsed *parser.Result) ([]updater.Dependency, error) {
var deps []updater.Dependency
for _, instruction := range parsed.AST.Children {
// Ignore everything but FROM instructions
if instruction.Value != command.From {
if !strings.EqualFold(instruction.Value, command.From) {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion docker/interpolate.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func NewInterpolation(parsed *parser.Result) *Interpolation {
Vars: map[string]string{},
}
for _, instruction := range parsed.AST.Children {
switch instruction.Value {
switch strings.ToLower(instruction.Value) {
case command.Arg:
varSplit := strings.SplitN(instruction.Next.Value, "=", 2)
if len(varSplit) == 2 {
Expand Down

0 comments on commit 7cfb735

Please sign in to comment.