Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't force path normalisation in case existing paths don't exist

  • Loading branch information...
commit 97515f00e944d2b266174ba36a22d1047d67fd7f 1 parent 8eebe9f
@hadley authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 R/path.r
  2. +1 −1  man/on_path.Rd
View
4 R/path.r
@@ -24,7 +24,7 @@ get_path <- function() {
#' @export
#' @rdname path
set_path <- function(path) {
- path <- normalizePath(path, mustWork = TRUE)
+ path <- normalizePath(path, mustWork = FALSE)
old <- get_path()
path <- paste(path, collapse = .Platform$path.sep)
@@ -51,7 +51,7 @@ add_path <- function(path, after = Inf) {
#' on_path("R")
#' on_path("gcc")
#' on_path("foo", "bar") # FALSE in most cases
-#' with_path(".", on_path("gcc"))
+#' with_path(tempdir(), on_path("gcc"))
on_path <- function(...) {
commands <- c(...)
stopifnot(is.character(commands))
View
2  man/on_path.Rd
@@ -15,7 +15,7 @@
on_path("R")
on_path("gcc")
on_path("foo", "bar") # FALSE in most cases
-with_path(".", on_path("gcc"))
+with_path(tempdir(), on_path("gcc"))
}
\seealso{
Other path: \code{\link{add_path}},
Please sign in to comment.
Something went wrong with that request. Please try again.