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

Install binary packages from zip files directly on windows #1192

Merged
merged 2 commits into from
Jun 2, 2016
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 1.11.1.9000

* bug fix for installation of binary packages on windows, they must be
installed directly from a zip file. (@jimhester, #1191, #1192)

* `install_*` functions and `update_packages()` refactored to allow updating of
packages installed using any of the install methods. (@jimhester, #1067)

Expand Down
5 changes: 5 additions & 0 deletions R/install-remote.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ install_remote <- function(remote, ..., force = FALSE, quiet = FALSE) {
return(invisible(FALSE))
}

if (is_windows && inherits(remote, "cran_remote")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be a little safer to condition on cran binary packages

install_packages(package_name, repos = remote$repos, type = remote$pkg_type, ..., quiet = quiet)
return(invisible(TRUE))
}

bundle <- remote_download(remote, quiet = quiet)
on.exit(unlink(bundle), add = TRUE)

Expand Down
2 changes: 2 additions & 0 deletions R/utils.r
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,5 @@ indent <- function(x, spaces = 4) {
ind <- paste(rep(" ", spaces), collapse = "")
paste0(ind, gsub("\n", paste0("\n", ind), x, fixed = TRUE))
}

is_windows <- isTRUE(.Platform$OS.type == "windows")