From bdb6042e069094f2a6d5c55d5be44efcae327acb Mon Sep 17 00:00:00 2001 From: Ben Schneider Date: Sat, 31 Aug 2024 11:19:23 -0400 Subject: [PATCH] For #1026. Update `repair_path()` to work with network paths, add test. --- R/utils.R | 5 +++-- tests/testthat/test-utils.R | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index f05a61ac..cd87d56b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -128,8 +128,9 @@ repair_path <- function(path) { } path <- path.expand(path) path <- gsub("\\\\", "/", path) - # WSL cmdstan path is a network path and needs the leading // - path <- gsub("//(?!wsl)", "/", path, perl = TRUE) + # Network paths (such as the cmdstan path on WSL) need the leading // + # https://github.com/stan-dev/cmdstanr/issues/1026 + path <- gsub("(?