Skip to content

Add a check for a folder with model's name #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2021

Conversation

rok-cesnovar
Copy link
Member

Summary

Fixes #456

Copyright and Licensing

Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Rok Češnovar

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

@@ -405,6 +405,9 @@ compile <- function(quiet = TRUE,
exe_base <- file.path(dir, basename(self$stan_file()))
}
exe <- cmdstan_ext(paste0(strip_ext(exe_base), exe_suffix))
if (dir.exists(exe)) {
stop("There is a subfolder matching the model name in the same folder as the model! Please remove or rename the subfolder and try again.", call. = FALSE)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bbbales2 Any thoughts on the error message? Open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Lemme give this a gooooo.

Copy link
Member

@bbbales2 bbbales2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

@rok-cesnovar rok-cesnovar merged commit 0bb40ee into master Mar 5, 2021
@rok-cesnovar rok-cesnovar deleted the check_folder_clash_with_exe branch March 5, 2021 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When there is a folder with the cmdstan model name cmdstanr produces strange errors
2 participants