Skip to content

Commit

Permalink
solution for r-lib#1244
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwiroy committed Jul 4, 2016
1 parent 4593165 commit 741541e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/download-method.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Adapated from:
# Adapted from:
# https://github.com/rstudio/rstudio/blob/master/src/cpp/session/modules/SessionPackages.R
#
# Copyright (C) 2009-12 by RStudio, Inc.
Expand All @@ -12,9 +12,9 @@ download_method <- function(x) {
}

auto_download_method <- function() {
if (capabilities("libcurl")) {
if (length(capabilities("libcurl")) && capabilities("libcurl")) {
"libcurl"
} else if (capabilities("http/ftp")) {
} else if (length(capabilities("http/ftp")) && capabilities("http/ftp")) {
"internal"
} else if (nzchar(Sys.which("wget"))) {
"wget"
Expand Down

0 comments on commit 741541e

Please sign in to comment.