Do not open project on error#145
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug where rstan_create_package() would attempt to open a non-existent RStudio project when the directory already exists. Additionally, it synchronizes the auto-generated package documentation with the maintainer email specified in the DESCRIPTION file.
- Moved the
file.exists(path)check before theon.exit()call to prevent opening a project when directory creation fails - Updated maintainer email in auto-generated documentation to match DESCRIPTION file (
jgabry@gmail.com)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| R/rstan_create_package.R | Fixed bug by moving the directory existence check before the on.exit() handler that opens RStudio project, preventing attempt to open non-existent project |
| man/rstantools-package.Rd | Synchronized auto-generated documentation (roxygen2) with maintainer email from DESCRIPTION file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Member
|
Great, thank you! |
jgabry
approved these changes
Dec 4, 2025
jgabry
left a comment
Member
There was a problem hiding this comment.
This looks good, thanks for fixing this! Merging now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If
pathdoes not exist, no project is created, but it is still attempted to open the project. This change fixes this.When building for testing, a new
rstantools-package.Rdwas created which was not in sync anymore with the .R file.