Closed stephlocke closed 5 years ago
Weird.
What do the following snippets return?
getOption("usethis.description")
and
usethis::ui_code_block(options(
usethis.description = list(
`Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))',
License = "MIT + file LICENSE",
Language = "es"
)
))
?
> getOption("usethis.description")
$`Authors@R`
[1] "person(\"Jane\", \"Doe\", email = \"jane@example.com\", role = c(\"aut\", \"cre\"),\n comment = c(ORCID = \"YOUR-ORCID-ID\"))"
$License
[1] "MIT + file LICENSE"
$Language
[1] "es"
> usethis::ui_code_block(options(
+ usethis.description = list(
+ `Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"),
+ comment = c(ORCID = "YOUR-ORCID-ID"))',
+ License = "MIT + file LICENSE",
+ Language = "es"
+ )
+ ))
list(`Authors@R` = "person(\"Jane\", \"Doe\", email = \"jane@example.com\", role = c(\"aut\", \"cre\"),\n comment = c(ORCID = \"YOUR-ORCID-ID\"))", License = "MIT + file LICENSE", Language = "es")
[Copied to clipboard]
:thinking: and the whole snippet below? (I expect it to give what you put in the first comment)
if(is.null(getOption("usethis.description"))){
usethis::ui_code_block(options(
usethis.description = list(
`Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"),
comment = c(ORCID = "YOUR-ORCID-ID"))',
License = "MIT + file LICENSE",
Language = "es"
)
))
usethis::ui_todo("DESCRIPTION defaults not set yet. Amend and paste the code above (copied to clipboard) to your .Rprofile via running usethis::edit_r_profile().")
usethis::ui_stop("Set DESCRIPTION default then run starters::start_here() again.")
} else{
usethis::ui_done("DESCRIPTION defaults are already set!")
}
Yep - still NULL It seems to not like the whole code snipped and is just bringing back the list bit. I don't suppose the code needs to be provided as a text string rather than bare code?
Ok can you make a PR? Not sure I 100% understand your suggestion.
This works
if(is.null(getOption("usethis.description"))){
usethis::ui_code_block("options(
usethis.description = list(
`Authors@R` = 'person(\"Jane\", \"Doe\", email = \"jane@example.com\", role = c(\"aut\", \"cre\"),
comment = c(ORCID = \"YOUR-ORCID-ID\"))',
License = \"MIT + file LICENSE\",
Language = \"es\"
)
)")
usethis::ui_todo("DESCRIPTION defaults not set yet. Amend and paste the code above (copied to clipboard) to your .Rprofile via running usethis::edit_r_profile().")
usethis::ui_stop("Set DESCRIPTION default then run starters::start_here() again.")
} else{
usethis::ui_done("DESCRIPTION defaults are already set!")
}
ok will commit it in a sec
NULL gets copied to the clipboard