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

Dockerfile's getAvailableVariables(number) returns variables that are outside the build stage at the given line #15

Closed
rcjsuen opened this issue Feb 7, 2018 · 1 comment
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Feb 7, 2018

import { DockerfileParser } from 'dockerfile-ast';

const content =
`FROM alpine
ARG var=8000
FROM alpine`

let dockerfile = DockerfileParser.parse(content);
console.log(dockerfile.getAvailableVariables(2).length);

With the code above, 1 will be returned instead of 0. It shouldn't be finding the var variable defined on the second line.

@rcjsuen rcjsuen added the bug label Feb 7, 2018
@rcjsuen rcjsuen self-assigned this Feb 7, 2018
@rcjsuen
Copy link
Owner Author

rcjsuen commented Feb 7, 2018

Fixed by 54bf5c3. I wrote the wrong issue number in the commit message. :(

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