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

ModifiableInstruction's getVariables() does not include variables in its flags #69

Closed
rcjsuen opened this issue Feb 17, 2020 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Feb 17, 2020

Although it's not valid to use variables and expect it to be resolved, we should still include it in the list of returned variables from getVariables().

import { DockerfileParser } from 'dockerfile-ast';
let dockerfile = DockerfileParser.parse(
    "HEALTHCHECK --interval=$var CMD echo"
);
let instruction = dockerfile.getInstructions()[0];
console.log(instruction.getVariables().length);
0
@rcjsuen rcjsuen added the bug label Feb 17, 2020
@rcjsuen rcjsuen self-assigned this Feb 17, 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