extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
175 stars 25 forks source link

Add install instructions to `write_license_note()` #281

Closed JosiahParry closed 6 months ago

JosiahParry commented 1 year ago

I've just used write_license_note() for the first time. Wonderful function! As I used it, I found the error message helpful since I didn't have the cargo-license library installed. Then it dawned on me that it might be useful to also include the command to install the library for those who may not be as familiar. Perhaps the function can be modified to something like

cli::cli_abort(
  c(
    "The {.code cargo license} command is required to run the {.fun write_license_note} function.",
    "Please install cargo-license ({.url https://crates.io/crates/cargo-license}) first.",
    i = "Run {.code cargo install cargo-license} from your terminal"
  ),
  class = "rextendr_error"
)