Values declared in include-files are not available.
skx opened this issue · comments
Steve Kemp commented
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)?
Steve Kemp commented
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.