Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions with only the escape character should have an empty list of properties #84

Closed
rcjsuen opened this issue Jul 13, 2020 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Jul 13, 2020

FROM scratch
ENV \
$ docker build .
Sending build context to Docker daemon   46.8MB
Error response from daemon: Dockerfile parse error line 2: ENV requires at least one argument

Similar to #83, the parser should not consider the ENV instruction as having any properties.

let dockerfileAst = require("dockerfile-ast");
let dockerfile = dockerfileAst.DockerfileParser.parse("ENV \\");
console.log(dockerfile.getInstructions()[0].getProperties().length);
1
@rcjsuen rcjsuen added the bug label Jul 13, 2020
@rcjsuen rcjsuen self-assigned this Jul 13, 2020
rcjsuen added a commit that referenced this issue Jul 13, 2020
Signed-off-by: Remy Suen <remy.suen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant