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 resolveVariable(*) throws TypeError if the line number is invalid #48

Closed
rcjsuen opened this issue Dec 20, 2018 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 20, 2018

import { DockerfileParser } from './main'
let dockerfile = DockerfileParser.parse("FROM alpine");
dockerfile.resolveVariable("image", 1);
$ node out/src/test.js
dockerfile-ast/out/src/dockerfile.js:107
        let resolvedVariable = image.resolveVariable(variable, line);
                                     ^

TypeError: Cannot read property 'resolveVariable' of null
    at Dockerfile.resolveVariable (dockerfile-ast/out/src/dockerfile.js:107:38)
    at Object.<anonymous> (dockerfile-ast/out/src/test.js:5:12)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
@rcjsuen rcjsuen added the bug label Dec 20, 2018
@rcjsuen rcjsuen self-assigned this Dec 20, 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