script-server icon indicating copy to clipboard operation
script-server copied to clipboard

Set environment variables without passing as argument

Open synedraIT opened this issue 4 years ago • 4 comments

Hello!

We want to pass a parameter as an environment variable, without passing it as a command line argument. Is this currently possible?

Thank you!

synedraIT avatar Mar 15 '21 13:03 synedraIT

Hi @synedraIT unfortunately not

bugy avatar Mar 15 '21 13:03 bugy

Hello, thanks for the quick response. Is such a feature planned for the future? I think it would be very useful, especially for passwords and the like.

synedraIT avatar Mar 15 '21 13:03 synedraIT

I added a feature flag to it. But there is no timeline for when it will be done. I have quite a big backlog and unfortunately not so much time recently.

In the meantime, I would suggest using https://github.com/bugy/script-server/wiki/Script-config#--secure option

bugy avatar Mar 15 '21 14:03 bugy

Hi @synedraIT, I added support for it (in dev version), there is a new configuration for every parameter: pass_as, can be one of [argument, env_variable, stdin]. By default every parameter is passed as argument AND env_variable.

bugy avatar Mar 17 '23 16:03 bugy