Skip to content

Commit

Permalink
Fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Mar 20, 2024
1 parent e37e6dd commit 0a2111a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Description: Similar to 'rstantools' for 'rstan',
migrate from 'rstan' to the more modern 'cmdstanr'.
Packages 'rstantools', 'cmdstanr', 'stannis', and
'stanapi' are similar Stan clients with different objectives.
Version: 0.2.1.9000
Version: 0.2.2
License: MIT + file LICENSE
URL: https://wlandau.github.io/instantiate/,
https://github.com/wlandau/instantiate
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# instantiate 0.2.1.9000 (development)

# instantiate 0.2.2

* Allow downstream packages to install even if `CmdStanR` is not installed (#20, @xinxinc476).

# instantiate 0.2.1

Expand Down
5 changes: 4 additions & 1 deletion R/stan_package_compile.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ stan_package_compile <- function(
threads = FALSE,
...
) {
stan_assert_cmdstanr()
# Not possible to test in automated tests in one coverage run.
# Covered in GitHub Actions workflows.
# nocov start
result <- try(stan_assert_cmdstanr())
if (inherits(result, "try-error")) {
return(invisible())
}
if (!stan_cmdstan_exists(cmdstan_install = cmdstan_install)) {
stan_cmdstan_message()
return(invisible())
Expand Down

0 comments on commit 0a2111a

Please sign in to comment.