Skip to content

Commit bc90281

Browse files
kevinusheyjimhester
authored andcommitted
teach remotes about the 'standard' remote type
1 parent c26b7d0 commit bc90281

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
# remotes dev
33

4+
* remotes now understands the "standard" remote type, as produced by packages
5+
installed from CRAN using `pak` (#309)
6+
47
* Fix return type of `install_remote()` when there is a circular dependency (#225)
58

69
* `remote_package_name.github_remote()` now works properly on Windows (#248)

R/install-remote.R

+7-1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ package2remote <- function(name, lib = .libPaths(), repos = getOption("repos"),
166166
}
167167

168168
switch(x$RemoteType,
169+
standard = remote("cran",
170+
name = x$Package,
171+
repos = x$RemoteRepos,
172+
pkg_type = x$RemotePkgType,
173+
sha = x$RemoteSha),
169174
github = remote("github",
170175
host = x$RemoteHost,
171176
package = x$RemotePackage,
@@ -231,7 +236,8 @@ package2remote <- function(name, lib = .libPaths(), repos = getOption("repos"),
231236
repo = x$RemoteRepo,
232237
release = x$RemoteRelease,
233238
sha = x$RemoteSha,
234-
branch = x$RemoteBranch)
239+
branch = x$RemoteBranch),
240+
stop(sprintf("can't convert package with RemoteType '%s' to remote", x$RemoteType))
235241
)
236242
}
237243

0 commit comments

Comments
 (0)