Import external json file with --tla-code not working
irizzant opened this issue · comments
irizzant commented
I have the following scenario.
Let's consider the simplest test.jsonnet file containing:
function(env) env
And the following env.json file:
{
custom: ''
}
If I invoke the following:
jsonnet --tla-code env="(import 'env.json') + {custom: 'value'}" test.jsonnet
I get:
{
"custom": "value"
}
If I invoke the following:
kubecfg --tla-code env="(import 'env.json') + {custom: 'value'}" show test.jsonnet
I get:
ERROR Error reading test.jsonnet: RUNTIME ERROR: Could not get candidate URLs for when importing env.json (imported from <top-level-arg:env>): Invalid import dir "<top-level-arg:env>": parse "<top-level-arg:env>": first path segment in URL cannot contain colon
<top-level-arg:env>:1:2-19 $
file:///tmp/test.jsonnet:1:15-18 function <anonymous>
Top-level function