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

Feature Request: use env variable ^ZENODO$ for Zotero token #95

Open
rkrug opened this issue Dec 6, 2023 · 2 comments
Open

Feature Request: use env variable ^ZENODO$ for Zotero token #95

rkrug opened this issue Dec 6, 2023 · 2 comments
Assignees

Comments

@rkrug
Copy link

rkrug commented Dec 6, 2023

When getting the API token from the environmental variables,

deposits/R/tokens.R

Lines 23 to 24 in bc3ca40

e <- Sys.getenv ()
e <- e [grep (service, names (e), ignore.case = TRUE)]

e <- e [which (!grepl ("sandbox", names (e), ignore.case = TRUE))]

looks for all environmental variables with zenodo and not sandbox, which works fine when having only one API key for Zenodo - I have two, one for read only and one for writing. Could I suggest to check for exactly the names equals ZENODO_SANDBOX and ZENODO?

@mpadge
Copy link
Member

mpadge commented Dec 6, 2023

Sure, could you please PR improvements to that? And then also add explicit instructions to the setup vignette. Thanks

@rkrug
Copy link
Author

rkrug commented Dec 6, 2023

OK - Will do so beginning of next week. Please feel free to assign it to me.

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

No branches or pull requests

2 participants