different style of flag separator can conflict with env var
dolanor opened this issue · comments
Tanguy ⧓ Herrmann commented
I'm still working on #66 and writing tests for the separator replacer, I figured there were no tests about it in the original PlainParser implementation. (I figured out when trying to implement the comment)
The problem I'm talking about is:
- A user defines 2 flags:
-s.1
and-s-1
- User sets an env var to
S_1
-> Should it set -s.1
or -s-1
?
Peter Bourgon commented
I don't consider it valid to have to have two discrete flags s.1
and s-1
.
Tanguy ⧓ Herrmann commented
So do I. But currently, it is possible. Should ff panic if somebody does that ?
If not, going from env var to a flag will be in order of replacer and I guess keep the first one. Would that be okay then ?
Peter Bourgon commented
Yeah, I would just ignore this case, personally.