Closed jimenezna06 closed 2 years ago
To be clear, you're saying that you want
env FOO=123 myprogram -foo=456
to set foo to 123, not 456?
if you set a flag the exec uses the flag if no flag is set it used env var if nothing is set it doesn’t work in other words a flag overrides the env var if an env var exists unless ff doesn’t allow it but I think it does?
does it allow this?
What you described is exactly how it works currently. Is it not the case for you?
I noticed that ffcli and ff doesn’t seem to load config from env vars. Is there a way to make sure it defaults to env vars? instead of having the flag override the env var if an env var exists. I am using the function:
ff.Parse(fs, os.Args[1:], ff.WithEnvVarNoPrefix())