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

Values declared in include-files are not available. #40

Closed
skx opened this issue May 25, 2021 · 1 comment · Fixed by #43
Closed

Values declared in include-files are not available. #40

skx opened this issue May 25, 2021 · 1 comment · Fixed by #43
Assignees
Labels
bug Something isn't working

Comments

@skx
Copy link
Owner

skx commented May 25, 2021

This is because we spawn a separate parser to process include-files.

Given this example file main.in:

include "temp.in"

shell {
    command => "echo ${value}",
}

And this include file, temp.in:

let value="Hello, world"

We'd expect:

$ marionette -verbose main.in
Hello, world
$

However we get nothing.

Solution:

  • Don't use a sub-parser. Keep all state in the same object (probably)?
@skx skx self-assigned this May 25, 2021
@skx skx added the bug Something isn't working label May 25, 2021
@skx
Copy link
Owner Author

skx commented May 25, 2021

Upon reflecton I think we'll move the variables out of the parser object, and create an environment package.

This will allow the CLI to define variables too, and will be cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant