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

Different output for get_maintainer and get_authors when Authors@R field malformed #140

Open
maciekbanas opened this issue Aug 29, 2023 · 0 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@maciekbanas
Copy link

maciekbanas commented Aug 29, 2023

First of all - thank you for the package. It does the job!

This issue is not critical, but I would prefer same output, when developer fills DESCRIPTION by hand and fails to write properly Authors@R field, e.g. forgets about last bracket ). For the time-being get_maintainer in that case returns character "NULL" which is awkward, while get_authors returns classic NULL.

Reprex below:

> desc_malformed_authors <- 
+   paste0("Package: TestPackage\nTitle: Test package\nVersion: 0.0.0.9000\n",
+          "Authors@R: \n    c(person(given = \"John\", family = \"Test\", \n ",
+          "email = \"john.test@tests.com\", \n role = c(\"aut\", \"cre\")),\n ",
+          "person(given = \"Joanna\", family = \"Checks\", \n ", 
+          "email = \"joanna.checks@tests.com\", \n role = c(\"aut\"))\n",
+          "Description: This package aims to test\n")
> desc_env <- desc::desc(text = desc_malformed_authors)
> desc_env
Package: TestPackage
Title: Test package
Version: 0.0.0.9000
Authors@R (parsed):
    * NULL
Description: This package aims to test
> desc_env$get_maintainer()
[1] "NULL"
> desc_env$get_authors()
NULL
@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants