You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that comments must start at the beginning of a line in a Dockerfile, the above RUN instruction should have four arguments in total:
a
b
#c
d
However, we are only detecting two.
import{DockerfileParser}from'dockerfile-ast';letcontent="RUN a \\\n"+"b #c \\\n"+"d";letdockerfile=DockerfileParser.parse(content);letinstruction=dockerfile.getInstructions()[0];console.log(instruction.getArguments());
RUN a \ b #c \ d
Given that comments must start at the beginning of a line in a Dockerfile, the above
RUN
instruction should have four arguments in total:a
b
#c
d
However, we are only detecting two.
Given that it stops after
b
, it seems like the#c
bit is confusing the parser.The text was updated successfully, but these errors were encountered: