Closed Hoeze closed 1 year ago
The snake-case parsing of arguments makes it impossible to pass uppercase environment variables, right?
E.g. env_TEST
would get translated to t_e_s_t
.
Interestingly, passing env_test_path='asdf'
results in an environment variable test_path="asdf"
.
So actually there is no need to parse them as snake-case.
An alternative approach is to define environment variables via JSON and put those variables into your script, which is then run through the pipe transformer.
Here's an example,
I have never used the environment variable feature in glow. Probably because I hit the same limitations you describe above!
Ah, OK, I did not think of that solution :grin:
will keep the issue open for now until this is properly documented
should delete those environment variable options from the docs, they are somewhat confusing
updating the example in the docs to avoid this issue in future:
From https://github.com/projectglow/glow/blob/master/docs/source/tertiary/pipe-transformer.rst:
Would it be possible to have some argument
jsonEnv
that can decode json-encoded environment variables? E.g.:This would make it significantly easier to adjust environment variables IMHO.