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
Switch to cli and use clickable links #74
Conversation
prefer_bullets <- function(pkgs, name) { | ||
prefer <- map_chr(pkgs, function(pkg) { | ||
cli::format_inline("{.run [conflict_prefer(\"{name}\", \"{pkg}\")](conflicted::conflict_prefer(\"{name}\", \"{pkg}\"))}") | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation seems off here. More importantly, no need to call format_inline()
here, because later we pass this to cli_abort()
which does the formatting (again). So it could be something like
sprintf("{.run [conflict_prefer(\"%s\", \"%s\")](conflicted::conflict_prefer(\"%s\", \"%s\"))}", name, pkg, name, pkg)
Co-authored-by: Gábor Csárdi <csardi.gabor@gmail.com>
@@ -26,7 +26,7 @@ disambiguate_infix <- function(name, pkgs) { | |||
|
|||
cli::cli_abort(c( | |||
"{label_conflicted()} {.strong {name}} found in {length(pkgs)} packages.", | |||
"Declare a preference with `conflict_prefer()`:", | |||
"Declare a preference with {.code conflict_prefer()}:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to link to the help here? Or use {.fn conflict_prefer}
?
namespace, | ||
"Or declare a preference with `conflict_prefer()`:", | ||
"Or declare a preference with {.code conflict_prefer}:", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Or declare a preference with {.code conflict_prefer}:", | |
"Or declare a preference with {.fn conflict_prefer}:", |
Looks good! |
No description provided.