Skip to content

Do not open project on error#145

Merged
jgabry merged 2 commits into
stan-dev:masterfrom
karchjd:master
Dec 4, 2025
Merged

Do not open project on error#145
jgabry merged 2 commits into
stan-dev:masterfrom
karchjd:master

Conversation

@karchjd

@karchjd karchjd commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

If path does 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.Rd was created which was not in sync anymore with the .R file.

Copilot AI review requested due to automatic review settings December 4, 2025 12:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 the on.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.

@jgabry

jgabry commented Dec 4, 2025

Copy link
Copy Markdown
Member

Great, thank you!

@jgabry jgabry left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good, thanks for fixing this! Merging now.

@jgabry jgabry merged commit 2f1625a into stan-dev:master Dec 4, 2025
12 checks passed
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.

3 participants