r-lib / revdepcheck

R package reverse dependency checking
https://revdepcheck.r-lib.org
Other
99 stars 31 forks source link

cloud_check produce better error when RSTUDIO_CLOUD_REVDEP_KEY unset #366

Open aronatkins opened 1 year ago

aronatkins commented 1 year ago

revdepcheck::cloud_check() was suggested by usethis::use_release_issue() when trying to release rsconnect (an rstudio/posit package).

For a first-time user, its output is less than helpful:

revdepcheck::cloud_check()
#> ℹ Building package tarball
#> Error: Cloud error (403): Forbidden
#> Message: Forbidden

The documentation for revdepcheck::cloud_check() does not suggest that RSTUDIO_CLOUD_REVDEP_KEY is needed. I eventually found the cloud vignette (https://revdepcheck.r-lib.org/articles/cloud.html), but that was only after looking at the source, seeing references to RSTUDIO_CLOUD_REVDEP_KEY and then searching the repo for other uses.

I also found mentions of RSTUDIO_CLOUD_REVDEP_KEY while searching our internal Slack for revdepcheck::cloud_check() references. I eventually got the right answer (request a key) but the path was not obvious.

Could revdepcheck::cloud_check() check for the existence of RSTUDIO_CLOUD_REVDEP_KEY and produce a more helpful error?