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

From's getBuildStage() and getBuildStageRange() returns null if the instruction has more than 3 arguments #74

Closed
rcjsuen opened this issue Mar 11, 2020 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Mar 11, 2020

FROM node AS build abc

Although the above Dockerfile is invalid, we should still return something for getBuildStage() and getBuildStageRange() given that the third argument does exist and it follows an AS.

let dockerfileAst = require("dockerfile-ast");
dockerfile = dockerfileAst.DockerfileParser.parse("FROM node AS build abc");
console.log("Name:\t" + dockerfile.getInstructions()[0].getBuildStage());
console.log("Range:\t" + dockerfile.getInstructions()[0].getBuildStageRange());
null
null
@rcjsuen rcjsuen added the bug label Mar 11, 2020
@rcjsuen rcjsuen self-assigned this Mar 11, 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