Make the command portion of the dockerfile parser case insensitive.
This commit is contained in:
parent
0d8725e778
commit
5a2a64074f
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
|
||||
LINE_CONTINUATION_REGEX = re.compile('\s*\\\s*\n')
|
||||
COMMAND_REGEX = re.compile('([A-Z]+)\s(.*)')
|
||||
COMMAND_REGEX = re.compile('([A-Za-z]+)\s(.*)')
|
||||
|
||||
COMMENT_CHARACTER = '#'
|
||||
|
||||
|
@ -70,7 +70,7 @@ def parse_dockerfile(contents):
|
|||
for line in lines:
|
||||
match_command = COMMAND_REGEX.match(line)
|
||||
if match_command:
|
||||
command = match_command.group(1)
|
||||
command = match_command.group(1).upper()
|
||||
parameters = match_command.group(2)
|
||||
|
||||
commands.append({
|
||||
|
|
Reference in a new issue