<#7219 Support `--print-var` in `meltano run`> Iss...
# meltano-repo-activity
g
#7219 Support
--print-var
in
meltano run
Issue created by aaronsteers Originally posted by @aaronsteers in #7212 (comment) From the thread:
If a user wishes to know exactly what env vars are being passed to a plugin, is there a way for them to do that after this change has been made?
I think the way we'd suggest users approach this would be with the
--print-var
arg sent to the CLI. We'd need to add support for this arg in more commands, though, since I think today it might only be supported in
invoke
. https://docs.meltano.com/reference/command-line-interface#debugging-plugin-environment
Debugging plugin environment #
When debugging plugin configuration, it is often useful to view environment variables being provided to a plugin at runtime. This can be achieved using --log-level=debug but for readability and convenience, the meltano invoke command also supports printing individual environment variables to stdout at runtime:
```
# Print the runtime value PLUGIN_ENVIRONMENT_VARIABLE_1:
meltano invoke --print-var <PLUGIN_ENVIRONMENT_VARIABLE_1> <PLUGIN_NAME>
# The option supports printing multiple variables as well.
# # Print the runtime values of both PLUGIN_ENVIRONMENT_VARIABLE_1 and PLUGIN_ENVIRONMENT_2 on separate lines:
meltano invoke --print-var <PLUGIN_ENVIRONMENT_VARIABLE_1> --print-var <PLUGIN_ENVIRONMENT_VARIABLE_2>
```
meltano/meltano