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
I think it'd be helpful to have a withPossibleFallback method.
The use case is if I want to calculate a fallback but with the option of failing and showing usage information.
ex: I wanted to fallback to using and env variable but also then do some validation on the env.
Perhaps this is currently possible and I just didn't notice how to?
The text was updated successfully, but these errors were encountered:
+1 I have kind of similar use case.
However, if breaking change is ok, I'd prefer having withFallback that takes arg of either Function1[Unit, Option[A]] or Function1[Unit, Try[A]].
Let me know what you guys think. I can create a PR if this is a good change as well.
2m
pushed a commit
to 2m/scopt
that referenced
this issue
Feb 25, 2020
I think it'd be helpful to have a
withPossibleFallback
method.The use case is if I want to calculate a fallback but with the option of failing and showing usage information.
ex: I wanted to fallback to using and env variable but also then do some validation on the env.
Perhaps this is currently possible and I just didn't notice how to?
The text was updated successfully, but these errors were encountered: