Skip to content

Commit 6d6ebab

Browse files
catalamartijennybc
andauthored
Use httr conditionally (#2574)
* Use httr conditionally * Tweak NEWS --------- Co-authored-by: Jenny Bryan <[email protected]>
1 parent 28ae8d6 commit 6d6ebab

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

Diff for: NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# devtools (development version)
22

3+
* Functions that use httr now explicitly check that it is installed
4+
(@catalamarti, #2573).
5+
36
* `test_coverage()` now works if the package has not been installed.
47

58
* `test_coverage_active_file()` now reports if any tests failed and does

Diff for: R/check-mac.R

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ check_mac_release <- function(pkg = ".", dep_pkgs = character(), args = NULL, ma
4040

4141
url <- "https://mac.r-project.org/macbuilder/v1/submit"
4242

43+
rlang::check_installed("httr")
4344
body <- list(pkgfile = httr::upload_file(built_path))
4445

4546
if (length(dep_built_paths) > 0) {

Diff for: R/release.R

+1
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ upload_cran <- function(pkg, built_path, call = parent.frame()) {
277277

278278
# Initial upload ---------
279279
cli::cli_inform(c(i = "Uploading package & comments"))
280+
rlang::check_installed("httr")
280281
body <- list(
281282
pkg_id = "",
282283
name = maint$name,

Diff for: R/run-source.R

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
source_url <- function(url, ..., sha1 = NULL) {
3232
stopifnot(is.character(url), length(url) == 1)
3333
rlang::check_installed("digest")
34+
rlang::check_installed("httr")
3435

3536
temp_file <- file_temp()
3637
on.exit(file_delete(temp_file), add = TRUE)

0 commit comments

Comments
 (0)