Skip to content

Commit

Permalink
Check subdirectories of the fixed CmdStan installation path
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed Jan 9, 2024
1 parent 953ca43 commit 7da32dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* Remove "internal" installation (#16).
* In the documentation, remove claims that `instantiate` is a good fit for centralized multi-user R environments (c.f. https://github.com/stan-dev/cmdstan/issues/1175).
* Check subdirectories of the fixed CmdStan installation path.

# instantiate 0.1.0

Expand Down
7 changes: 6 additions & 1 deletion R/stan_cmdstan_path.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ stan_cmdstan_path <- function(
cmdstan_install
)
stan_assert_install(install)
if_any(
path <- if_any(
identical(install, "fixed"),
.Call(c_cmdstan_path_fixed, PACKAGE = "instantiate"),
cmdstanr_path()
)
if_any(
cmdstan_valid(path),
path,
cmdstanr("cmdstan_default_path")(dir = path)
) %|||% NULL
}

0 comments on commit 7da32dc

Please sign in to comment.