Skip to content

Commit c39aeb4

Browse files
authored
Merge pull request #651 from stan-dev/ignore-other-directories-in-.cmdstan
in cmdstan_default_path() ignore other directories in .cmdstan
2 parents e9c12be + 72619e9 commit c39aeb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

R/path.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ cmdstan_default_path <- function(old = FALSE, dir = NULL) {
145145
cmdstan_installs <- list.dirs(path = installs_path, recursive = FALSE, full.names = FALSE)
146146
}
147147
if (length(cmdstan_installs) > 0) {
148+
cmdstan_installs <- grep("^cmdstan-", cmdstan_installs, value = TRUE)
148149
latest_cmdstan <- sort(cmdstan_installs, decreasing = TRUE)[1]
149150
if (is_release_candidate(latest_cmdstan)) {
150151
non_rc_path <- strsplit(latest_cmdstan, "-rc")[[1]][1]

0 commit comments

Comments
 (0)