Skip to content
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

Add Viper prefix for env var #57

Open
fmorency opened this issue May 15, 2024 · 6 comments
Open

Add Viper prefix for env var #57

fmorency opened this issue May 15, 2024 · 6 comments
Assignees
Labels

Comments

@fmorency
Copy link
Collaborator

Current code is

WithViper("") // In danger, we don't use any prefix for env variables.

which means that things like

HOME=$HOME/.poppy ./build/manifestd init baba
➜  manifest-ledger git:(f09ff6e) ✗ ls ~/.poppy 
config  data

"kinda" of work...

@fmorency fmorency added the enhancement New feature or request label May 15, 2024
@fmorency fmorency self-assigned this May 15, 2024
@fmorency
Copy link
Collaborator Author

The environment variable and Viper prefix are broken on 0.50.x.

cosmos/cosmos-sdk#18345

@Reecepbcups
Copy link
Collaborator

MANIFESTD_ works with viper :) sdk handles this under the hood for you already

proof

MANIFESTD_NODE=https://bad-rpc.com:443 manifestd status

...

post failed: Post "https://bad-rpc.com:443": dial tcp: lookup bad-rpc.com on 216.165.129.158:53: no such host

thus it used the manifest node specific

@Reecepbcups
Copy link
Collaborator

Closing since this is supported. re-tag me in this if this is not what you were referencing

@fmorency
Copy link
Collaborator Author

Hey @Reecepbcups, can you try

MANIFESTD_HOME=$HOME/.foofoo manifestd init foo

It doesn't work properly here on 0.50.x (was fixed current SDK main)

@fmorency fmorency reopened this May 22, 2024
@Reecepbcups
Copy link
Collaborator

Oh I see, specifically it is the home env var breaking.

Since manifest uses a fork anyways we can backport to our fork. Is it a big enough issue we should?

Let me know if you want me too

@fmorency
Copy link
Collaborator Author

Oh I see, specifically it is the home env var breaking.

Since manifest uses a fork anyways we can backport to our fork. Is it a big enough issue we should?

Let me know if you want me too

Non-blocking. We can wait for 0.51.x as we have a workaround (--home)

Thanks for offering @Reecepbcups, I appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants