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

Regression in 0.0.7 causes ARG's getProperty() to return different things #41

Closed
rcjsuen opened this issue May 28, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented May 28, 2018

The change for PropertyInstructions to not override getArguments() in c7416ab has caused a regression. The following code shouldn't make arg.getProperty() return null.

var dockerfileAst = require("dockerfile-ast");
var dockerfile = dockerfileAst.DockerfileParser.parse("ARG a=\"a\\  b");
var arg = dockerfile.getInstructions()[0];
console.log(arg.getProperty() !== null);

Building against dockerfile-ast@0.0.8:

$ docker build .
Sending build context to Docker daemon   1.78MB
Step 1/4 : FROM node:alpine
 ---> 0a3c080a624d
Step 2/4 : RUN npm install dockerfile-ast@0.0.8
 ---> Using cache
 ---> 9f7a63b9815d
Step 3/4 : COPY index.js index.js
 ---> 40863e9828a3
Step 4/4 : RUN node index.js
 ---> Running in 56e7bcad6106
false
Removing intermediate container 56e7bcad6106
 ---> 6be49449a6bb
Successfully built 6be49449a6bb

Building against dockerfile-ast@0.0.7:

$ docker build .
Sending build context to Docker daemon   1.78MB
Step 1/4 : FROM node:alpine
 ---> 0a3c080a624d
Step 2/4 : RUN npm install dockerfile-ast@0.0.7
 ---> Using cache
 ---> b1e26d38c852
Step 3/4 : COPY index.js index.js
 ---> 07f29466745a
Step 4/4 : RUN node index.js
 ---> Running in bcaf8b1186e6
false
Removing intermediate container bcaf8b1186e6
 ---> fac0b5cfaa6d
Successfully built fac0b5cfaa6d

Building against dockerfile-ast@0.0.6:

$ docker build .
Sending build context to Docker daemon   1.78MB
Step 1/4 : FROM node:alpine
 ---> 0a3c080a624d
Step 2/4 : RUN npm install dockerfile-ast@0.0.6
 ---> Using cache
 ---> d53738fe0e50
Step 3/4 : COPY index.js index.js
 ---> e0ad583854a4
Step 4/4 : RUN node index.js
 ---> Running in e1e1de560b31
true
Removing intermediate container e1e1de560b31
 ---> 87501b7cf644
Successfully built 87501b7cf644
@rcjsuen rcjsuen added the bug label May 28, 2018
@rcjsuen rcjsuen self-assigned this May 28, 2018
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