-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fcfe748
commit 73c899e
Showing
8 changed files
with
48 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
renv_pkgtype_check <- function(type) { | ||
|
||
case( | ||
type == "source" ~ renv_pkgtype_check_source(type), | ||
type == "binary" ~ renv_pkgtype_check_binary(type), | ||
~ abort(sprintf("unrecognized type '%s'", type)) | ||
) | ||
|
||
} | ||
|
||
renv_pkgtype_check_source <- function(type) { | ||
type | ||
} | ||
|
||
renv_pkgtype_check_binary <- function(type) { | ||
|
||
# if the user has requested installation of a binary package, | ||
# and this edition of R was compiled with support for binary | ||
# packages, then proceed | ||
pkgtype <- .Platform$pkgType | ||
if (grepl("\\bbinary\\b", pkgtype, perl = TRUE)) | ||
return(type) | ||
|
||
# user has requested installation of binary packages, but their | ||
# installation of R only supports source packages | ||
abort("type 'binary' is not supported on this platform") | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters