Skip to content
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

Error handling for missing git repo #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raykrajci
Copy link

@raykrajci raykrajci commented Mar 21, 2024

The "Create function definition file" action will not proceed in R projects that lack a git repository. The get_git_user_name() function throws an "libgit2::git_repository_open_ext : could not find repository" error when there is no repo. This error causes the glue() call when populating the Roxygen "author" comment to fail.

I added error handling so that the get_git_user_name() function returns an empty string in anticipation of the "libgit2::git_repository_open_ext : could not find repository" error.

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.

1 participant