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

Flag option without a value does not get parsed #79

Closed
rcjsuen opened this issue Apr 4, 2020 · 0 comments
Closed

Flag option without a value does not get parsed #79

rcjsuen opened this issue Apr 4, 2020 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Apr 4, 2020

let dockerfileAst = require("dockerfile-ast");
let dockerfile = dockerfileAst.DockerfileParser.parse(
    "HEALTHCHECK --meal=drink=water,food"
);
let flag = dockerfile.getInstructions()[0].getFlags()[0];
console.log(flag.getOptions().length);
1

The absence of an = sign is causing the second food option to not get parsed.

@rcjsuen rcjsuen added the bug label Apr 4, 2020
@rcjsuen rcjsuen self-assigned this Apr 4, 2020
@rcjsuen rcjsuen closed this as completed in 1f4b1e0 Apr 4, 2020
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