Skip to content
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

Use httr conditionally #2574

Merged
merged 2 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# devtools (development version)

* Functions that use httr now explicitly check that it is installed
(@catalamarti, #2573).

* `test_coverage()` now works if the package has not been installed.

* `test_coverage_active_file()` now reports if any tests failed and does
Expand Down
1 change: 1 addition & 0 deletions R/check-mac.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ check_mac_release <- function(pkg = ".", dep_pkgs = character(), args = NULL, ma

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

rlang::check_installed("httr")
body <- list(pkgfile = httr::upload_file(built_path))

if (length(dep_built_paths) > 0) {
Expand Down
1 change: 1 addition & 0 deletions R/release.R
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ upload_cran <- function(pkg, built_path, call = parent.frame()) {

# Initial upload ---------
cli::cli_inform(c(i = "Uploading package & comments"))
rlang::check_installed("httr")
body <- list(
pkg_id = "",
name = maint$name,
Expand Down
1 change: 1 addition & 0 deletions R/run-source.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
source_url <- function(url, ..., sha1 = NULL) {
stopifnot(is.character(url), length(url) == 1)
rlang::check_installed("digest")
rlang::check_installed("httr")

temp_file <- file_temp()
on.exit(file_delete(temp_file), add = TRUE)
Expand Down
Loading