Closed sz-cgt closed 3 years ago
I ran into the same issue when trying to set a second key in a keyring when using a file backend, as below:
library(keyring)
options(keyring_backend = "file")
keyring_create("test_keyring")
key_set_with_value(service = "foo",
password = "bar",
keyring = "test_keyring")
key_set_with_value(service = "foo2",
password = "bar2",
keyring = "test_keyring")
I found a workaround that uses unlist()
and lapply()
unstead of [[
and vapply()
, which seems to handle the NULL that shows up in user_name
if none has been set previously. The solution is not particularly elegant, and I'm not sure it covers all cases. All of the tests that run are passing on my Mac at least. I'll create a PR which you can take or leave.
Fixed in db90922
(#95).
The documentation for the
backend$set()
method says that the username field is optional. However, the file backend does not handle situations where the username is not supplied when setting an entry.Created on 2020-01-15 by the reprex package (v0.3.0)