You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow controlling environment variables when invoking a plugin #16
// We want to make sure the command has access to no env vars, as the default is the current env.
cmd.Env=emptyEnv
I propose to add a ClientOption (or ExecRunnerOption or CallOption, not sure) that accepts a []string of the form "key=value", to match exec.Cmd.Env and os.Environ() format.
My use case: I write plugins that depend on (cloud providers') Go SDKs. These SDKs usually configure themselves through environment variables, among other ways. I want my plugins to feel intuitive by behaving like other tools and respecting these environment variables.
I guess it is possible to work around that limitation by passing environment variables as part of the plugin request, and then call os.Setenv() from the plugin. But that doesn't feel right.
Activity