-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables are not populated to cmd flags #8179
Comments
@clevinson previously we had prefix'd ENV variables => flags mapping. So we shouldn't focus on adding specific flags but fix the behaviour as before. Ex: https://github.com/cosmos/gaia/blob/v2.0.14/cmd/gaiacli/main.go#L73-L74 here we configure the prefix and if we need From docs: |
@troian from Akash has a hacky fix
|
No, the order does not matter. |
@alexanderbez is it comment to our hack? |
Yes :) |
@alexanderbez Can you let me know if you're working on this? If not, we'll do some triaging and get someone from our team on it. |
It's not assigned to me and I'm not working on it, nor do I plan to. |
This comment #8132 (comment) is relevant here, correct @alexanderbez ? |
Yes @amaurymartiny. I really suggest we refactor the entire thing. |
Reopening as the fix in #8337 only resolved the issue when starting the server (e.g. |
So from @anilcse it seems that the problem with the current implementation has more to do with |
@clevinson there is a one more thing to be changed into root PreRun hook in order to get all things working PersistentPreRunE: func(cmd *cobra.Command, _ []string) error {
if err := server.InterceptConfigsPreRunHandler(cmd); err != nil {
return err
}
ctx := server.GetServerContextFromCmd(cmd)
return client.SetCmdClientContextHandler(initClientCtx, cmd)
}, |
Description
Certain client cmd flags historically have been able to be set via environment variables, instead of explicitly always having to set the flag (e.g.
CHAIN_ID
,FROM
,$SIMD_HOME
etc.).This is not currently supported in Stargate and should be.
@anilcse @alexanderbez I've attempted to find documentation of exactly which flags are expected to be supported with a corresponding env var, but can't find clear evidence of the prior behavior. Feel free to add to this description or reply specific flags that should be supported.
For Admin Use
The text was updated successfully, but these errors were encountered: