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

allow TRUE for as default for action = "flag" #55

Closed
jmbarbone opened this issue Apr 26, 2023 · 0 comments · Fixed by #56
Closed

allow TRUE for as default for action = "flag" #55

jmbarbone opened this issue Apr 26, 2023 · 0 comments · Fixed by #56
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jmbarbone
Copy link
Owner

library(scribe)
ca <- command_args()
ca$add_argument("--foo", action = "flag", default = TRUE)
#> Warning: flag must be NULL or TRUE when action="flag"
ca$parse()
#> $foo
#> [1] FALSE
ca$set_input("--foo")
ca$parse()
#> $foo
#> [1] TRUE

Created on 2023-04-25 with reprex v2.0.2

@jmbarbone jmbarbone added the bug Something isn't working label Apr 26, 2023
@jmbarbone jmbarbone self-assigned this Apr 26, 2023
@jmbarbone jmbarbone added this to the CRAN v0.2.0 milestone Apr 26, 2023
jmbarbone added a commit that referenced this issue Apr 26, 2023
jmbarbone added a commit that referenced this issue Apr 26, 2023
jmbarbone added a commit that referenced this issue Apr 26, 2023
jmbarbone added a commit that referenced this issue Apr 26, 2023
@jmbarbone jmbarbone mentioned this issue Apr 26, 2023
jmbarbone added a commit that referenced this issue Apr 29, 2023
jmbarbone added a commit that referenced this issue Apr 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant