Skip to content

Commit b7e07ac

Browse files
authored
Merge pull request #381 from stan-dev/version_check
Error if CMDSTAN_VERSION is not present
2 parents 0799428 + 00660e5 commit b7e07ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/path.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ read_cmdstan_version <- function(path) {
157157
}
158158
makefile <- readLines(makefile_path)
159159
version_line <- grep("^CMDSTAN_VERSION :=", makefile, value = TRUE)
160+
if (length(version_line) == 0) {
161+
stop("CmdStan makefile is missing a version number.", call. = FALSE)
162+
}
160163
sub("CMDSTAN_VERSION := ", "", version_line)
161164
}
162165

0 commit comments

Comments
 (0)