diff --git a/NEWS.md b/NEWS.md index 561b0c3..1f7849b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 diff --git a/R/stan_cmdstan_path.R b/R/stan_cmdstan_path.R index 7136974..f1e95c2 100644 --- a/R/stan_cmdstan_path.R +++ b/R/stan_cmdstan_path.R @@ -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 }